aboutsummaryrefslogtreecommitdiffstats
path: root/site
diff options
context:
space:
mode:
authorbrian cully <bjc@spork.org>2025-12-29 12:50:01 -0500
committerbrian cully <bjc@spork.org>2025-12-29 12:50:01 -0500
commit316286b8b65ac5a7abf5117dc942a70b94e1be53 (patch)
treeb88a41ff223531024e96bdb2dcfeb8263ce136db /site
parentfda2373d81929dda9d0206d30cf4e3c1710859f1 (diff)
downloadpolyring-316286b8b65ac5a7abf5117dc942a70b94e1be53.tar.gz
polyring-316286b8b65ac5a7abf5117dc942a70b94e1be53.zip
bench with poly finding
Diffstat (limited to 'site')
-rw-r--r--site/index.html2
-rw-r--r--site/pure.mjs2
2 files changed, 3 insertions, 1 deletions
diff --git a/site/index.html b/site/index.html
index 97b5997..5ef2cf6 100644
--- a/site/index.html
+++ b/site/index.html
@@ -22,7 +22,7 @@
<section class='bench'>
<h2>bench</h2>
- <input name='iters' value='100000'>
+ <input name='iters' value='1000'>
<button>bench</button>
<p class='results'></p>
</section>
diff --git a/site/pure.mjs b/site/pure.mjs
index 03b5996..bc3f8a4 100644
--- a/site/pure.mjs
+++ b/site/pure.mjs
@@ -268,6 +268,8 @@ export default async function () {
const start = self.performance.now();
for (let i = 0; i < iters; i++) {
update(points);
+ points.sort((a, b) => a.y > b.y);
+ findPoly3(points);
}
const end = self.performance.now();
const delta = end - start;