Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
It's easier to 10x code performance than 2x it (richiejp.com)
2 points by richiejp 11 months ago | hide | past | favorite | 2 comments


>6. Slow CPU instructions and cache invalidation

So many performance hits come from poor memory access patterns. Often "simpler" or "slower" algorithms have "better" performance for an application, because they allow for better memory access patterns and less cache invalidation.

Sometimes these sorts of things are localized and easy to fix. Sometimes the problems get "baked in" to an application's data structures and are hard to fix later.

High on the list of things to think about at the design stage is "how will X affect my cache usage?"


It's definitely under rated that data locality may matter more than time or space complexity.

Most software though is doing really dumb stuff on I/O, or just doing work that doesn't need to be done.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: