[PR #11725] Introduce new TIL string helpers, teach older ones to use wmemcmp #28721

Open
opened 2026-01-31 09:30:21 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/11725

State: closed
Merged: Yes


til::equals:
At the time of writing wmemcmp() is not an intrinsic for MSVC,
but the STL uses it to implement wide string comparisons.
This produces 3x the assembly per comparison and increases
runtime by 2-3x for strings of medium length (16 characters)
and 5x or more for long strings (128 characters or more).
See: https://github.com/microsoft/STL/issues/2289

Additionally a number of case insensitive, locale unaware
helpers for prefix/suffix comparisons are introduced.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11725 **State:** closed **Merged:** Yes --- til::equals: At the time of writing wmemcmp() is not an intrinsic for MSVC, but the STL uses it to implement wide string comparisons. This produces 3x the assembly _per_ comparison and increases runtime by 2-3x for strings of medium length (16 characters) and 5x or more for long strings (128 characters or more). See: https://github.com/microsoft/STL/issues/2289 Additionally a number of case insensitive, locale unaware helpers for prefix/suffix comparisons are introduced.
claunia added the pull-request label 2026-01-31 09:30:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28721