[Vm-dev] String comparison primitive preliminary speed-up result: 20-600x

Henrik Sperre Johansen henrik.s.johansen at veloxit.no
Wed Feb 21 14:00:35 UTC 2018

Ref. blog post, are you sure you are measuring equivalent entities?
Usually the AsciiOrder is a constant, preallocated array, no?

Seems to me, with the code posted in blog post, you're mostly measuring
array instantation, not collate...

var := ByteString new: 3.

 [ByteString compare: var with: var collated: (0 to: 255) asByteArray]
benchFor: 5 second.
a BenchmarkResult(500,460 iterations in 5 seconds 1 millisecond. 100,072 per

AsciiCollate := (0 to: 255) asByteArray.

 [ByteString compare: var with: var collated: AsciiCollate] benchFor: 5

a BenchmarkResult(79,507,782 iterations in 5 seconds 2 milliseconds.
15,895,198 per second)

Sent from: http://forum.world.st/Squeak-VM-f104410.html

More information about the Vm-dev mailing list