4 ms·
Maybe in ncmncm's circle they laugh at C developers, but trying to extrapolate that across the finance industry is not credible. Performance at the sharp end c
by fnord123 7y ago
Maybe in ncmncm's circle they laugh at C developers, but trying to extrapolate that across the finance industry is not credible.
Performance at the sharp end comes from preallocating memory, reducing syscalls, removing PIC (drop the GOT), static linking (enable LTO), using LTO, using simd where possible, hand rolling important functions in assembly, cpusets, reducing network hops, attempting to get the program to fit in L1 cache, putting the code into the switch, moving to fpga, moving to asic.
There's loads more optimizations but almost none of them have anything to do with C++ over C.
- ncmncm 7y agoYou do all those things with C++ (or, for fpga, asic, etc., without). There is exactly zero benefit to dropping to C first. And, nobody suggested anybody actually laughs at C developers. We just don't see them.
- fnord123 7y ago> You do all those things with C++ (or, for fpga, asic, etc., without). There is exactly zero benefit to dropping to C first. That's my point. The performance tuning is generally not between C++ or C hence why you cannot extrapolate your experiences to the rest of the finance industry. >And, nobody suggested anybody actually laughs at C developers. You said, "In the finance world, you would be laughed out of the room for proposing C for a performance-critical task." Then in discussing the nature of the laughter you said "The laughter would not be about measurable performance; you might well be able to get C code to go as fast. The laughter would be over your apparent fear of the C++ compiler, and the suggestion to spend their money on a predictably inferior, more expensive, less maintainable solution."
- ncmncm 7y agoWe have a case in English, as in all languages in its cohort, for discussion of counterfactuals, signaled by "would". If there were anyone proposing C for performance-critical code, they would be laughed at. Happily, none are.