So what if some platforms *might* have a crappy memcmp? They should improve it, of course, it affects all other software as well...
And if some platform *is* shown to have a 70x slower memcmp and anyone cares, change it for that platform, at that point?
On July 8, 2014 3:02:56 PM EDT, Stas Boukarev <email@example.com> wrote:
"Douglas Katzman" <firstname.lastname@example.org> writes:
The branch "master" has been updated in SBCL:I really don't like calling foreign functions for lisp code like that.
via 956aa35502b93740679842bb38f50481777c0b08 (commit)
from 7354854c14241b7d8def7ab4953257e55f3c00f7 (commit)
Author: Douglas Katzman <email@example.com>
Date: Mon Jul 7 23:34:57 2014 -0400
Improve STRING= on x86[-64] by using memcmp() sometimes.
Also the unequal length pre-test, like in STRING-EQUAL, was missing.
This benchmarked twice as fast for strings of 20 characters in length
on two different pieces of hardware and approached 70x for huge strings.
Hopefully it will not be ruined with Unicode normalization,
presumably occurs on creation of strings, not in every call to string=.
It's something that can't be controlled, there's no guarantee that it's
actually faster on all supported OSes.
The cut off point appears to be based on some particular implementation
Sent from my Android device with K-9 Mail. Please excuse my brevity.