Better i386.inc:fpc_ansistr_unique.
Merge request out of this issue that makes fpc_ansistr_unique
take 0 jumps in the common case of being a no-op. Can be rewritten using jmp
if that bothers you, but I suppose shouldn’t?
Benchmark: noise. Okay, you might try UniqueStringBenchmark.pas that emulates a typical lazy scenario (possible outputs: (A) 1.7
before → 1.2
after, (B) 4.3
before → 3.3
after), but depending on the code layout you might not observe a speedup (in altered version I was getting 1.4
before → 1.4
after on the notebook (A)), so let’s settle on a speculative argument that not taking a jump is better than taking a jump.