Closed doste closed 8 months ago
@doste Almost everything seems ok for this to land!
Tests show still two users of primitiveCompareBytes2. We should remove those tests before integration as the implementation does not exist anymore ^^.
primitiveCompareBytes2.
My bad. Now it's been removed :)
Redo of https://github.com/pharo-project/pharo-vm/pull/611
This pull request introduces a new primitive to compare bytes.
In the mentioned PR, two implementations were proposed, one using a loop in 'pure Pharo' and the other memcmp and thus relying on the C implementation.
We made a couple of benchmarks and we saw that the memcmp implementation:
is hundreds of times faster when comparing thousands of bytes.
The alternative word-by-word comparison implemented purely in slang is also better than the baseline but it is 10x slower than memcmp for large comparisons.