So trying sha512sum (which is a bit overkill) takes less than 10ms, and because I don’t know what to use other than time, to get a quick timing…
I just concatenated parser.rs 100 times, giving me around:
- 90ms with
sha512sum
- 140ms with
sha256sum (why slower?)
- 60ms with
sha1sum
So it’s about 20 times faster than parsing the file, just from this quick test.
If we’re talking about RLS, it also can guarantee that its VFS files have not changed without rehashing them (it already shouldn’t be reading anything from disk).