Skip to content

faster - #42

Open
Fil wants to merge 2 commits into
mainfrom
fil/faster
Open

Fil wants to merge 2 commits into
mainfrom
fil/faster

Conversation

@Fil

@Fil Fil commented Dec 1, 2026

Copy link
Copy Markdown
Member

polygonLength again matches the speed before bf977c2, and polygonHull is ~15% faster.

Fil added 2 commits December 1, 2026 14:49
Reverts the change to src/length.js in bf977c2 ("deliberate ES6 syntax").

Math.hypot is slow in V8: polygonLength is 3–7× faster.
The lower hull can use the sorted points instead of a copy with negated y. About 5% faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant