inokawa / virtua

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.
https://inokawa.github.io/virtua/
MIT License
1.35k stars 49 forks source link

quickselect O(n) median #488

Closed onx2 closed 3 months ago

onx2 commented 3 months ago

I implemented a C linear time median but IDK if it'll be valuable considering what the cache._sizes limit might be but thought it would be nice as an option if you'd like.

A brief benchmark of how it might affect perf at difference array sizes. image