I just noticed TASE - if you're building a market data transport layer, you'd better *not* use .NET because the latency will be unpredictable w/ the GC and you'll end up w/ not-so-real-time data ;) Although, I don't really know how fast TASE streams and it might not be that bad at all. If you're only transporting data and aim for raw speed, use C/C++, but if your market data platform (assuming you're building one) involves feed normalization and any other pre/post-processing (and/or caching) then .NET might have a negligible perf. impact.
On 10/30/06, Itay Zandbank <[EMAIL PROTECTED]> wrote:
> buffer[50] = (byte) value; > buffer[51] = (byte) (value >> 8); > buffer[52] = (byte) (value >> 0x10); > buffer[53] = (byte) (value >> 0x18); Yes, I can do that for integers and longs, but I can't really do that for doubles. And of course, the C *(int *)(buffer+offset) = myInt is faster still. Again, I can write the unsafe code that works for doubles, too, but the framework simply seems lacking in that respect. > While I understand your complaints, unless your product is a network layer component(s) I > can bet my ass (and I'm not gay! :P) that copying memory around won't be a performance > issue. Yes, copying memory around is not as bad as memory allocation. BitConvert.GetBytes allocates memory, too (or perhaps it doesn't? It sure seems like it does). > 1) is not an issue - build your own Buffer class, and a Buffer pool or whatever and don't > call methods you know will allocate memory > 2) WFMO on varying handles is a common pattern in server apps and you don't have to worry > about the overhead, because if carefully designed, your software will very rarely need to > re-build the handles array I don't see how I can avoid calling BeginReceive. Is .NET's Socket.Select better behaved? It takes three ILists and modifies them. I guess I can come up with my own efficient Select-only IList implementation, but for this I need to know exactly how Select behaves (for instance, that it scans the list once, removing objects as it goes, or perhaps scans twice, etc...). Since this behavior is not documented, I'll have to create an efficient Select-only IList implementation that only works with one framework version (as this undocumented behavior may change). While this can be a fun challenge, I don't think I can rely on it. The answer may very well be "for high performance communications, use C++ and the Windows API", I'm just hoping it's not. Thanks, Itay. <html><body><center><hr><b><font face=arial size=2>Visit the Tel Aviv Stock Exchange's Website<a href=http://www.tase.co.il> www.tase.co.il</a></b></body></html>
Cheers, Stoyan =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com