SQLite improving performance with pre-sort
(andersmurphy.com)
from cm0002@infosec.pub to programming@programming.dev on 30 Jun 01:19
https://infosec.pub/post/48740305
from cm0002@infosec.pub to programming@programming.dev on 30 Jun 01:19
https://infosec.pub/post/48740305
#programming
threaded - newest
Good news, Everyone!
Srsly this is great!
I don’t know much Clojure, but this should be doable in Java. I would be interested in seeing the results of sorting the data via both quicksort and heap sort. I’m not sure what sort Clojure defaults to, but if the distribution of IDs is uniform, then I’d imagine the downsides of heap sort are pretty much universal to all sorts you’re likely to use, which makes it more interesting here to me.
At the very least, Clojure’s docs seem to say that
sortis stable, which isn’t needed here (we know all IDs are unique). You can probably gain performance just by switching to a performant unstable sort, just in general.