4 ms·
This stuff makes such a difference that it's almost ridiculous to not consider it from the very beginning. We're not talking 10x difference. More like 1000x.
by bob1029 5y ago
This stuff makes such a difference that it's almost ridiculous to not consider it from the very beginning.
We're not talking 10x difference. More like 1000x.
One bad access pattern can be the difference between millions of transactions per second, and mere thousands. Many times, this bad access pattern is manifested in things as simple as using a class instead of a struct, or using a lock when a CAS would do the trick.
The most popular siren song in all of modern technology is the obsession with making all the cores share the work. For a vast majority of problems that operate on shared state in a serialized fashion (i.e. anything a bank would do), consolidation of processing to 1 thread is always going to give you the most throughput.
- _vvhw 5y ago> The most popular siren song in all of modern technology is the obsession with making all the cores share the work. For a vast majority of problems that operate on shared state in a serialized fashion (i.e. anything a bank would do), consolidation of processing to 1 thread is always going to give you the most throughput. Thanks for a great quote! For the same argument, see also Frank McSherry et al's "Scalability! But at what COST?" [1] In some cases the single-threaded implementations are more than an order of magnitude faster than published results for systems using hundreds of cores. [1] https://www.usenix.org/system/files/conference/hotos15/hotos15-paper-mcsherry.pdf https://www.usenix.org/system/files/conference/hotos15/hotos...
- commandlinefan 5y ago> using a class instead of a struct I'd never heard that before... how would that make a difference?
- bob1029 5y agoConsider an array of classes vs an array of structs. Scanning classes linearly still requires pointer indirection. Value types such as structs have everything inline.
- deleted 5y ago[deleted]