Skip to content

perf(js): validate F32 input before rounding - #2015

Open
toprameen wants to merge 2 commits into
bendlang:mainfrom
toprameen:reject-invalid-f32-before-rounding
Open

toprameen wants to merge 2 commits into
bendlang:mainfrom
toprameen:reject-invalid-f32-before-rounding

Conversation

@toprameen

Copy link
Copy Markdown
Contributor

The JS F32 reader now validates the whole input before exact decimal rounding. Rejected text skips conversion, while accepted text uses the same grammar and rounder.

A decimal midpoint followed by 5,000 zeros and a space previously exceeded the existing five-second test limit on Bun and Node. The extended regression now returns None and retains the earlier long-integer rejection case.

The regression passes through source and freshly compiled CLIs, emitted Bun/Node, and native C. Seven neighboring float fixtures pass on source/Bun/Node/native C. The repository gate passes 54/54; TypeScript reports the same seven baseline errors. comp.ts uses three fewer tokens.

@toprameen
toprameen marked this pull request as ready for review November 2, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant