|
|
|
|
|
by DrBazza
69 days ago
|
|
If you work in finance, you've probably just bankrupted your company. Nanoseconds matter. Clean code tends to equal simple code, which tends to equal fast code. The order of items in memory does matter, as does cache locality. 32Kb fits in L1 cache. If of course you're talking about web apps then that's just always been the Wild West. |
|
Wat? Approximately every algorithm in CS101 has a clean and simple N^2 version, a long menu of complex N*log(N) versions, and an absolute zoo of special cases grafted onto one of the complex versions if you want the fastest code. This pattern generalizes out of the classroom to every corner of industry, but with less clean names+examples. The universal truth is that speed and simplicity are very quick to become opposing priorities. It happens in nanoseconds, one might say.
Cache-aware optimization in particular tends to create unholy code abominations, it's a strange example to pick for clean=simple=fast wishcasting.