You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perf-sensitive lexing/parsing in ES often operates over code points represented as integers rather than strings. Currently, if we want to test whether a code point is a member of some Unicode property set, we have to do String.fromCodePoint(cp) and eval a regexp (assuming it isn’t practical to embed the property data), and it’s a slow path thing. This proposal should improve perf in such cases, but it appears we’ll still be left with the need to convert numeric code points to strings before we can check their membership.
I’d be curious to know if an API like String.getUnicodePropertyOfCodePoint() has been considered, and whether this seems valuable to others. That is, in addition to the API proposed here currently, not instead of it.
The text was updated successfully, but these errors were encountered:
Hi! Can you help me make the case in #3 for why this even belongs in ES? (see the other issue)
…
I’d be curious to know if an API like String.getUnicodePropertyOfCodePoint() has been considered, and whether this seems valuable to others. That is, in addition to the API proposed here currently, not instead of it.
It makes a lot of sense. As you said, in addition, not instead. It could similarly take an array of codepoints (see #1 )
Perf-sensitive lexing/parsing in ES often operates over code points represented as integers rather than strings. Currently, if we want to test whether a code point is a member of some Unicode property set, we have to do String.fromCodePoint(cp) and eval a regexp (assuming it isn’t practical to embed the property data), and it’s a slow path thing. This proposal should improve perf in such cases, but it appears we’ll still be left with the need to convert numeric code points to strings before we can check their membership.
I’d be curious to know if an API like
String.getUnicodePropertyOfCodePoint()
has been considered, and whether this seems valuable to others. That is, in addition to the API proposed here currently, not instead of it.The text was updated successfully, but these errors were encountered: