Little things matter
Khem Raj March 10, 2025 #metaRecently, meta published a case study claiming to reduce CPU usage by ~20%, which is quite impressive. One thing to note is
- 15,000 servers’ worth of annual capacity savings from a single one-character code change.
This was in C++ code, where a std::vector was resulting in array copies because it was
using auto
keyword to declare the vector, turning this into a reference ( using auto& ) resulted into
avoiding the duplication.
"It was a one-character commit, which, after it was shipped to production, equated to an estimated 15,000 servers in capacity savings per year," said Rome.
Sometimes small things can have profound impact, and it happens a lot.