Notice the only compilation difference between the string-scanners is that the version in 4.4.4 declares data
and pos = 0
in the class body itself. The compilation output for decode.ts
is identical.
However, the benchmarks are significantly different:
logfmt2#decode3 x 1,246,767 ops/sec ±2.22% (83 runs sampled)
logfmt2#decode4 x 879,750 ops/sec ±1.68% (85 runs sampled)