mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-12 02:13:04 +08:00
Every evaluation of `globalThis` as a value built an array literal of every name the global type declares (hundreds of strings) and registered each one in the known-name table again. A server that reads a singleton through `globalThis` per request spent about a tenth of its time there. Emit the name table as one immortal static array per program (the tagged-template site array, keyed by its contents), and return the global object at once when the runtime sees a table it has already registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>