Hacker News new | past | comments | ask | show | jobs | submit login

Not just databases but really any kind of latency sensitive software especially with “realtime” requirements (e.g telecom gear)



Yep. After algorithmic improvements, tracking (and limiting) the use of malloc in a program can improve performance by an order of magnitude or more. Not only is allocating slow, but having data spread all over main memory is terrible for the CPU’s cache and branch predictor.

I’ve gotten a lot of massive performance wins by rewriting code in rust because I can control memory allocations more closely. Some people I’ve talked to about this seem to just hear “rust = fast”. I’ve seen expensive rust rewrites which somehow end up running slower than the equivalent Javascript code. Turns out if you write rust like you write javascript, with boxes, vecs and .clone()s everywhere it’s going to be slow.




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

Search: