Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to learn how to write latency-critical, fast C++/Java/C# code? [closed]

Could anyone give me some pointers as to the best way in which to learn how to do very low latency programming? I have many programming books but I've never seen one which focused (or helped) on writing extremely fast code. Or are books not the best way forward?

Some advice from an expert would be really appreciated!

EDIT: I think I'm referring more to CPU/Memory bound.

like image 458
Tom Avatar asked Jan 26 '11 22:01

Tom


1 Answers

[C++ programmer]:

Ultra-low-latency programming is hard. Much harder than people suspect when they first start down the path. There are some techniques and "tricks" you can employ. Like IO Completion ports, multi core utilization, highly optimized synchronization techniques, shared memory. The list goes on forever. (edit) It's not as simple as "code-profile-refactor-repeat" because you can write excellent code that is robust and fast, but will never be truly ultra-low latency code.

Unfortunately there is no one single resource I know of that will show you how it's done. Programmers specializing in (and good at) ultra low-latency code are among the best in the business and the most experienced. And with good reason. Because if there is a silver bullet solution to becoming a good low-latency programmer, it is simply this: you have to know a lot about everything. And that knowledge is not easy to come by. It takes years (decades?) of experience and constant study.

As far as the study itself is concerned, here's a few books I found useful or especially insightful for one reason or another:

  • MSDN Libraries
  • Art Of Computer Programming
  • Hacker's Delight
  • Unix Network Programming: Vol 1
  • Computer Architechture
  • Tech journals on the ACM
like image 130
John Dibling Avatar answered Oct 04 '22 22:10

John Dibling