3 ms·
Nobody is saying hand-write it in assembly like RollerCoaster Tycoon so you can get decent performance on a 90MHz Pentium with 16MB of RAM. Tons of software wo
by torstenvl 3y ago
Nobody is saying hand-write it in assembly like RollerCoaster Tycoon so you can get decent performance on a 90MHz Pentium with 16MB of RAM.
Tons of software would run faster if it DIDN'T use custom stuff. Don't load a JavaScript framework for form validation if using `required` and `pattern` are enough. Don't write your own sorting algorithm unless it's faster than qsort(). Don't write your own data storage engine if SQLite covers your use case.
Story time: I once wrote a memset() replacement because one compiler kept optimizing out my memset() call and didn't have memset_s(). It slowed my program down a lot. When I looked carefully I saw I was always resetting the whole buffer, even though I was keeping track of how much had been written to it. Fixing that lead to a ~10x speedup (0.1s to process a large word processor document went to 0.01s, occasionally 0.02s).
- MichaelZuo 3y agoThat's an interesting example, probably most software products featured on HN are less complex then Rollercoaster Tycoon 1 in core logic, perhaps not in every aspect.
- threatofrain 3y ago> Don't load a JavaScript framework for form validation if using `required` and `pattern` are enough. Don't write your own sorting algorithm unless it's faster than qsort(). Don't write your own data storage engine if SQLite covers your use case. Most software is made by stitching together off-the-shelf components. I don't think people on the web need a warning about not writing too much custom code. The HN complaint about the web is regarding bloat from people who walk the mainstream road of web development. Loading a bloated framework to do whatever is an example of such mainstream development.
- deleted 3y ago[deleted]