HOME FORUMS BROKERS SOFTWARE BOOKS CONTACT US
Elite Trader Your Account  •  Become a Member  •  Help  •  Search    
    Forums ›› Technically Speaking ›› Programming ›› Lightweight threads  


Post A Reply
    Page 4 of 4:   1  2  3   4  
rufus_4000
 

Registered: Jul 2005
Posts: 568

 

05-06-12 07:16 PM

Ok, I will bite. Those who know me knows that I am not a .NET person by any means. But for a large number of concurrent lightweight threads (with the computing threads and I guess the arbitrage opportunity seeking threads), I would think some language constructs like "coroutines" maybe close to the desired goal. I am currently using a customized version of coroutines (libpcl with stack jumps for anyone that cares) along with my thread pool library in production platform, and it has yielded significant performance improvements (over simple "green-ish" threads). I believe MSFT calls coroutines "Fibers" under the .NET, but that's about the extent of my knowledge there.

For those of you who are not familiar with coroutines (other than the original Don Knuth's definition), lookup the Wikipedia entry. I think of it as a concurrency semantics free (as concurrency is implied in the "Yield" operation) cooperative execution, which, incidentally (!), works quite well for data processing, analytics generating, etc.

    Edit/Delete Quote Complain
amazingIndustry
 

Registered: Aug 2009
Posts: 570

 

05-07-12 01:40 AM

Re .Net there are plenty public sites out there that published performance results that show that task switching and generally running light-weight work on tasks rather than generating threads is always advantageous in terms of resource allocation and computational efficiency. I am not sure about the term "fibers" and thus cannot comment but my understanding of "coroutines" is a concept that was implemented through the arrival of task programming (at least in .Net). Note that most coroutine libraries date back to 2002-2003 when .Net was at 2.0.

It is very easy for anyone to run a performance comparison by starting up n-number threads and have them operate as worker threads and then trying to solve the same problem using tasks. The new Async CTP framework is terrific because it is very logical and the beauty of it is that it requires minimal code changes though I always recommend to think parallelism/concurrency at design time, its not optimal to try to squeeze sequential code into a concurrent framework through code changes.


Quote from rufus_4000:

Ok, I will bite. Those who know me knows that I am not a .NET person by any means. But for a large number of concurrent lightweight threads (with the computing threads and I guess the arbitrage opportunity seeking threads), I would think some language constructs like "coroutines" maybe close to the desired goal. I am currently using a customized version of coroutines (libpcl with stack jumps for anyone that cares) along with my thread pool library in production platform, and it has yielded significant performance improvements (over simple "green-ish" threads). I believe MSFT calls coroutines "Fibers" under the .NET, but that's about the extent of my knowledge there.

For those of you who are not familiar with coroutines (other than the original Don Knuth's definition), lookup the Wikipedia entry. I think of it as a concurrency semantics free (as concurrency is implied in the "Yield" operation) cooperative execution, which, incidentally (!), works quite well for data processing, analytics generating, etc.

    Edit/Delete Quote Complain
nitro
 

Registered: Sep 2001
Posts: 17951

 

03-15-13 07:01 PM

A nice article on FSM as it applies to trading:

http://learnyousomeerlang.com/finite-state-machines

    Edit/Delete Quote Complain
    Page 4 of 4:   1  2  3   4  
Post A Reply


Receive an email whenever a new post is added to this thread by subscribing to it.
 
Rate This Thread:

Forum Jump:
 

 

   Conduct Rules  -  Privacy Policy  -  Day Trader -  Day Trader Forum -  Best Trading Software -  Sitemap Copyright © 2013, Elite Trader. All rights reserved.    
 
WHILE YOU'RE HERE, TAKE A MINUTE TO VISIT SOME OF OUR SPONSORS:
Advantage Futures
Futures Brokerage & Clearing
AMP Global Clearing
Futures and FX Trading
Bright Trading
Professional Equities Trading
CTS
Futures Trading Software
DaytradingBias.com
Professional Trading Analytics
ECHOtrade
Professional Trading Firm
eSignal
Trading Software Provider
FXCM
Forex Trading Services
Global Futures
Futures, Options & FX Trading
Interactive Brokers
Pro Gateway to World Markets
JC Trading Group
Direct Access Trading
MB Trading
Direct Access Trading
MultiCharts
Trading Software Provider
NinjaTrader
Trading Software Provider
OANDA
Currency Trading
optionshouse
Option Trading & Education
Rithmic
Futures Trade Execution Platform
SpeedTrader
Direct Access Trading
SpreadProfessor
Spread Trading Instruction
thinkorswim by TD Ameritrade
Direct Access TradingAdvertisement
TradersStudio
System Building & Backtesting
Trading Technologies
Trading Software Provider
Trend Following
Trading Systems Provider