pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
115 stars 71 forks source link

Primitive to compare bytes #759

Closed doste closed 8 months ago

doste commented 8 months ago

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:

guillep commented 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 ^^.

imagen
doste commented 8 months ago

primitiveCompareBytes2.

My bad. Now it's been removed :)