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
{{ message }}
Repository navigation
JS F32 bit casts allocate a fresh buffer and typed views on every call #1638
On main e5527d5, f32_bits and f32_from_bits each create a backing buffer and two typed-array views per call. A real exported Bend function bits(x: F32) -> U32 takes about 294-308 ms for one million warmed calls on Bun 1.3.13/Linux x86-64. This is unnecessary allocation on numeric code paths: the cast is synchronous and its backing storage never escapes. I am testing one private four-byte DataView reused by both helpers, with actual exported-module calls covering signed zero, subnormal values, and the largest finite F32. No representation change or NaN-payload guarantee is intended.
Activity
Lorenzobattistela commentedon Oct 20, 2026
Closing per #1644: JS is the reference runtime, so we don't take JS-only performance changes (see #1643).