<i18n dev> RFR: 8302877: Speed up latin1 case conversions [v2]

Eirik Bjorsnos duke at openjdk.org
Tue Feb 21 10:03:28 UTC 2023


On Tue, 21 Feb 2023 09:33:07 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:

> I have the feeling that most case-insensitive comparisons are pretty short, so not sure how useful this is IRL.

There seems to be a win from strings of size 32 bytes upwards. (That's probably longer than most keys in TreeMaps using String.CASE_INSENSITIVE_ORDER, such as j.n.h.HttpHeaders)


Benchmark                    (size)  Mode  Cnt   Score   Error  Units
EqualsIgnoreCase.scalar          16  avgt    2  20.608          ns/op
EqualsIgnoreCase.scalar          32  avgt    2  36.510          ns/op
EqualsIgnoreCase.vectorized      16  avgt    2  18.601          ns/op
EqualsIgnoreCase.vectorized      32  avgt    2  12.795          ns/op


This is outside scope for this PR, I just wanted to leave a trace of this observation here for future record.

-------------

PR: https://git.openjdk.org/jdk/pull/12623


More information about the i18n-dev mailing list