5 ms·
It's a bit unique to each situation, but a few topics that come to mind immediately: * Profile & measure to narrow down where time is being spent * Memoize re
by mmccaff 12y ago
It's a bit unique to each situation, but a few topics that come to mind immediately:
* Profile & measure to narrow down where time is being spent
* Memoize repeated function calls
* Cache data that doesn't frequently change
* Minify web assets
* Gzip compress web output (a la mod_deflate)
* Load balance
* Shard
* Strategic database indexing
* Asynchronous workers when beneficial
* Use the correct data structures
* Minimize Disk I/O
^ I suppose the last few are architecture-related more so than code.
These topics are mostly specific to web, but, here is a "curated list of Web Performance Optimization"
https://github.com/davidsonfellipe/awesome-wpo https://github.com/davidsonfellipe/awesome-wpo
Since nobody has quoted Donald Knuth yet (and this quote sometimes gets bent to fit situations that it shouldn't):
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"