I wanted your guys thoughts because you probably know more than me but according to people atTC39. We should be changing localeCompare so it is faster. It should check if the comparison is with ASCII or UNICODE then go through a fast or a slow path
On Thursday, October 9, 2025 at 3:12:04 PM UTC+5 Zeeshan Abid wrote: > I am just attaching the TC39 feature request here in case anyone wants to > follow it https://es.discourse.group/t/faster-string-comparisons/2444 > > On Thursday, October 9, 2025 at 12:06:47 AM UTC+5 Zeeshan Abid wrote: > >> Hello, I noticed that `toLower() === toLower()` is the common practice >> for comparing strings ignoring case sensitivity. I wanted to know is it >> possible to add a function like >> >> `String.compare(str1, str2, IgnoreLowerCaseOption);` >> >> This should in theory run faster than doing `toLower() === toLower()` >> >> I already tried using `String.prototype.localeCompare` and it is slower >> than doing `toLower() === toLower()` >> >> Thanks! > > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/73e4e96d-cca0-4d0d-8558-799566a36907n%40googlegroups.com.
