diff options
| author | brian cully <bjc@spork.org> | 2025-12-29 12:50:01 -0500 |
|---|---|---|
| committer | brian cully <bjc@spork.org> | 2025-12-29 12:50:01 -0500 |
| commit | 316286b8b65ac5a7abf5117dc942a70b94e1be53 (patch) | |
| tree | b88a41ff223531024e96bdb2dcfeb8263ce136db /src/lib.rs | |
| parent | fda2373d81929dda9d0206d30cf4e3c1710859f1 (diff) | |
| download | polyring-316286b8b65ac5a7abf5117dc942a70b94e1be53.tar.gz polyring-316286b8b65ac5a7abf5117dc942a70b94e1be53.zip | |
bench with poly finding
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -118,6 +118,16 @@ pub fn init() -> JSResult<()> { let perf = window().performance().unwrap(); let start = perf.now(); for _ in 0..iters { + s.points.sort_by(|a, b| { + if a.y > b.y { + std::cmp::Ordering::Greater + } else if a.y == b.y { + std::cmp::Ordering::Equal + } else { + std::cmp::Ordering::Less + } + }); + s.find_poly(); s.update()?; } let end = perf.now(); |
