Serving the Quantitative Finance Community

 
User avatar
dd3
Posts: 4
Joined: June 8th, 2010, 9:02 am

Low latency ... Que?

April 30th, 2013, 7:18 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: dd3QuoteOriginally posted by: DSPGuyNot if you are going for absolute speed.Presumably these boys are going for the last microsecond. I wonder how many people look at the asm code that's being generated? Or for that matter compare highly optimized 'C' to trendy C++ before making pronouncements? My point is for some reason they commingle low latency and STL / Boost,which to me seems ridiculous. Even 'C' that's too abstract gives up a lot.I once found a race condition by accident when looking at the asm code for a really simple loop. The compiler was reloading a value from memory after the comparison was done of a load of the same address. There was no guarantee that the value compared was the same as the reloaded value... lost data! When writing tight code I generally check that the compiler generates something along the lines of what I'd expect. I've seen throughput gains of 10% when one virtual was eliminated.One a related issue: is it possible to discover (potential) race conditions that did not occur when compiled for a 2-core machine (2 threads) but which did actualise when the app was installed on a 4-core machine (4 threads) by looking at asm code?I'm not sure, it would be difficult. The code I was referring to was a small, maybe 6 line loop. I wasn't even looking for problems, just what asm was being generated.Here is the situation: http://stackoverflow.com/questions/1472 ... cmovTrying to visualise the possible outcomes of multicore program flow will soon drive you demented I think
 
User avatar
dd3
Posts: 4
Joined: June 8th, 2010, 9:02 am

Low latency ... Que?

April 30th, 2013, 7:21 pm

QuoteOriginally posted by: ashkarQuoteOriginally posted by: dd3QuoteOriginally posted by: DSPGuyNot if you are going for absolute speed.Presumably these boys are going for the last microsecond. I wonder how many people look at the asm code that's being generated? Or for that matter compare highly optimized 'C' to trendy C++ before making pronouncements? My point is for some reason they commingle low latency and STL / Boost,which to me seems ridiculous. Even 'C' that's too abstract gives up a lot.I once found a race condition by accident when looking at the asm code for a really simple loop. The compiler was reloading a value from memory after the comparison was done of a load of the same address. There was no guarantee that the value compared was the same as the reloaded value... lost data! When writing tight code I generally check that the compiler generates something along the lines of what I'd expect. I've seen throughput gains of 10% when one virtual was eliminated.what compiler was this? Some standard c/c++?Visual studio 2012. The virtual call was in an extremely tight loop, replacing it with template specialisation improved things.
 
User avatar
bluetrin
Posts: 2
Joined: September 9th, 2005, 6:41 am

Low latency ... Que?

May 1st, 2013, 8:32 am

QuoteOriginally posted by: slackerQuoteOriginally posted by: bluetrinMaybe they need someone who will write some low latency code but will need to interface it or communicate somehow with code written by people in the other technologies ?Maybe they need someone who will write... better job specs:-)EDIT: sorry I read 'better specs' instead of 'better job specs'
Last edited by bluetrin on April 30th, 2013, 10:00 pm, edited 1 time in total.
 
User avatar
ArthurDent
Posts: 5
Joined: July 2nd, 2005, 4:38 pm

Low latency ... Que?

May 1st, 2013, 12:39 pm

QuoteOriginally posted by: dd3QuoteOriginally posted by: CuchulainnOne a related issue: is it possible to discover (potential) race conditions that did not occur when compiled for a 2-core machine (2 threads) but which did actualise when the app was installed on a 4-core machine (4 threads) by looking at asm code?I'm not sure, it would be difficult. Trying to visualise the possible outcomes of multicore program flow will soon drive you demented I thinkYou need some theory here from the 70s.(*)Process algebras. CSPhttp://en.wikipedia.org/wiki/Communicating_sequential_processesThese tend to be more well known in the computer hardware community than in software, since "wires" by their very nature have concurrency issues.(*) As opposed to the theory behind Fortran and Lisp, developed in the 50s, which inspire all of our modern languages...