Difftastic spends a remarkable 49% of its runtime just reading and writing to a FxHashMap of ~1 million items. This hashmap stores the predecessor vertex when calculating the shortest route.
I'm running out of ideas. I can't use perfect hashmaps, are there other speed tricks?
miniblog.
Related Posts
I would have thought that invoking a C compiler would be a solved problem. Looking at Rust's cc crate there's a remarkable long tail of corner cases to fix.
Exotic CPUs, microarchitectures, compiler differences, operating system differences, etc.
One remarkable aspect of the JS packaging ecosystem is that people package individual functions. For example, lodash.sortby: https://www.npmjs.com/package/lodash.sortby
It shows how lightweight the packaging process is. I've not seen this happen in other ecosystems.
Smalltalk has a remarkable method named #become: that allows you to modify all pointers to a given object to point to a different object!
https://gbracha.blogspot.com/2009/07/miracle-of-become.html
This goes even further than updating instances when a class changes, it's changing instance references.
