Skip to main content

Module utils

Module utils 

Source

Modulesยง

fx
Fast non cryptographic hash maps (the Fx hash of the rust compiler): the keys of the crate are small (ids, short strings, serialized token structures) and are not controlled by an attacker that could exploit the collisions.
number
javascript number formatting (Number.prototype.toString()), used wherever the typescript code converts a number to a string ("" + n, template literals).
pool
Reused scratch buffers: the walkers and the traversals use a stack of node ids that is taken from a thread local pool and returned when it is dropped, instead of allocating a stack for each traversal (the typescript port shares a single stack for the same reason, see visitStack in src/ast/arena.ts).
time
performance.now(): milliseconds. native: a monotonic clock, wasm: the host clock (imported css_now)