3 ms·
At work, we have code that runs in the browser to fuzzy search a list of database tables. It was slow. I rewrote it to use tries as an index, and it performs tw
by bastawhiz 5y ago
At work, we have code that runs in the browser to fuzzy search a list of database tables. It was slow. I rewrote it to use tries as an index, and it performs two orders of magnitude faster. It also uses two orders of magnitude more memory, and returns unusual results in rare pathological cases.
"Faster" doesn't need to mean "faster by every measure", it needs to mean that it's faster in the ways that matter given the constraints of the problem and what the program is trying to accomplish. The author of the code seems to have been very clear that this was a proof of concept around perceived performance of a specific aspect of the application, and I can't think of how the really doesn't satisfy that.
- fredrikholm 5y agoIn his follow up video[0], he shows that in-use-memory is half that of Windows terminal, whilst simultaneously being >100x faster. Windows terminal chugging away in the background consuming 20% CPU for minutes at a time whilst he's debunking these claims / running the same data on refterm a few times over is hilarious (inflammatory or not). 0. https://www.youtube.com/watch?v=99dKzubvpKE https://www.youtube.com/watch?v=99dKzubvpKE