mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Number() of a string with an optional sign and 1 to 15 digits returns the integer directly; every other string keeps the full StringToNumber grammar, out of line. split() with a separator collects its first batch of pieces before creating the result, so the result is an inline array of exactly that size, filled in place. A split's default limit skips the uint32 conversion, and pieces of a proven-ASCII string are created ASCII, including the scratch pieces of split loops. indexOf() from the start of a proven-ASCII string searches bytes directly, and slice() of one skips the UTF-16 index map. The one-byte case of the byte search reaches memchr without a stack frame.