Hacker News new | ask | show | jobs
by altcognito 4349 days ago
I'd be more worried about making the code readable and easy to modify than high performance. You realize this is at best 5-10 OPS right?

Because in 12 months, nobody is going to know that you saved 2 operations by cleverly "arranging" your code.

I'm not saying you shouldn't arrange your code as best you can, but performance in this situation would absolutely be secondary to readability.

The link you give has nothing to do with the topic of math. It's mostly about knowing how your application is interacting with the system and a basic pragmatic approach to lock contention (also not math).