Join GitHub today
perf: optimize hash for build #4067
This addresses a hot path, which was discovered by @retronym using FlameGraph, by removing intermediate creation of byte Arrays.
According to the flamegraph, evalCommon footprint reduced from 4.5% to 3.6%. See https://gist.github.com/eed3si9n/d68f3aa91be7bbe55b0c8cf77e37cf98.
If we focus on the remaining 3.6%, it turns out that one of the hot paths is
So I tried
This reduced the median from 39.467s to 37.275s (with minimum measurement 35.674s). Given that build timestamp is not subject to subsecond incremental compilation, non-milisec accuracy I think is worth considering for this use case.