This should reduce the number of growSlice operations resulting in some minor speedups. The number was determined by looking at the average size of keys.
⚡ More efficient Regex umbr.Equals
Instead of doing replace, a FindStringSubmatch is actually all that's needed. It is just a minor change, but still reduces the runtime by a few tens of milliseconds.
Coverage increased (+0.009%) to 86.327% when pulling a5ae6e80c3acb7c7cad07ba79bf8e58d6ece9386 on small_perf_improvements into 66622c88f54b317dbbf885c13b4ce643398ad77b on master.
⚡ Grow strings.Builder at beginning
This should reduce the number of
growSlice
operations resulting in some minor speedups. The number was determined by looking at the average size of keys.⚡ More efficient Regex umbr.Equals
Instead of doing replace, a
FindStringSubmatch
is actually all that's needed. It is just a minor change, but still reduces the runtime by a few tens of milliseconds.See #47 for a similar improvement.