Anyone coding in Assembler?

Discussion in 'App Development' started by braincell, Feb 28, 2012.

  1. Very interesting thread with new insights :)
     
    #41     May 31, 2012
  2. Do you have an example of ASM code that works more efficiently than the code a C compiler generates ? I always thought as well that I could write faster ASM code than Visual Studio could generate but after decompiling I was always amazed how well the code was optimized and came to the conclusion that there's really not much improvement ASM can give you ...

    BTW why use olly when you can just view the disassembly directly in VS ?
     
    #42     Jun 12, 2012
  3. so far he could not, but yes I agree when programming against hardware ASM can be of benefit, though most drivers nowadays are coded in C/C++.

    I agree that .Net's CLR is much more efficient than most die-hard C++ make it out to be. Each language has its place, I just disagree with the negative press and comments regarding .Net performance of efficiently and elegantly programmed code. Still, I admit some C++ threading libraries are still slightly faster than what you could get with .Net's TPL, Dataflow, and Async libraries.

     
    #43     Jun 12, 2012
  4. Did you ever decompile .net code ? If you do, you'll probably change your mind ;) .NET just sucks when it comes to speed.

    I was talking in my previous post about native C code of course
     
    #44     Jun 12, 2012
  5. which part sucks? Can you give me one very specific example (as detailed as possible) where ASM or C code runs circles around a well written C# code? Maybe you have not run .Net since version 2 ;-)

     
    #45     Jun 12, 2012
  6. Memory allocation and garbage collection alone make C# garbage. Just try to code a simple messaging (order sending) algo in C# and see how many orders/second you can transmit. Then do the same in C++. You'll probably see a factor 3-5 difference there.
     
    #46     Jun 12, 2012
  7. that is total bs. I run 6.5 million ticks per second through my own backtesting platform entirely coded up in C#. That includes reading from my own binary data store, deserialization, merging of multi-symbol feeds, and the running of a simple strategy. I have no heard of ANY other system that comes close to that, knowing there are a number vendors out there which coded up their platforms in C++, it runs circles even around ringbuffers (such as the one by LMAX). (For your information, I peruse ZeroMQ for inproc and outofproc messaging, the messaging itself maxes out at about 12 million messages per second within a single box, that is on the .Net API)

    You can turn off .Net garbage collection and do your own. Regarding your example which specific aspect in transmitting messages are you talking about? The message sending part? The order creation part? The event structure? Sorry but I am tired of reading blanket statements. Give a specific example otherwise your statement loses a lot of credibility.

     
    #47     Jun 12, 2012
  8. What do you mean with messaging 'within a single box' ? I was talking about messaging between a client/server. Not sure what causes the slowness, I've never really delved much into it, but the mere fact alone that here is NO fast commercial C# FIX engine is enough proof. And like said, if you don't believe me, then just try it yourself and try so send a simple FIX order in a loop, both C# and C++
     
    #48     Jun 12, 2012
  9. for starters there is not a single hft shop I know that submits orders through FIX. FYI, take a look at ZeroMQ, you can use the tcp protocol to send messages between clients on different machines at blazing fast speeds, even with the .Net API. If you limit the discussion to the submission of orders from a local machine to the broker then a well written .Net API gets orders to the broker at pretty much identical speeds than APIs of any other language. The issue is that historically such APIs were written in C++ which is still the de-facto standard. It is not a testimony to the bad performance of .Net. If IB wrote a brand new .Net API I want to bet with you that it would beat hands down their current C++ API (for IB I used before a .Net wrapper of the C++ socket API which never caused issues or lags).

     
    #49     Jun 12, 2012
  10. LOL. Then how do you send a routable order to nasdaq ? :)

    If you're really convinced about this, then you should consider building and selling your own FIX engine. Currently the fastest commercial C# FIX engine is the Cheetah from "Rapid Addition", but their engine just sucks hairy balls compared to the average C++ engine. Rapid Addition charges about $10,000 month for each license, so you'll be rich, buddy :)
     
    #50     Jun 12, 2012