rvagg/memdown — pull request #7 by mhart (2013-12-05 11:23:44+00:00)
Title: Use a binary search to determine insert/delete position for _keys

This results in a ~60x speed increase when dealing with thousands of items.

(it was taking 120s to insert only 10,000 items!)

Things still start to slow down a fair bit when dealing with >100k items, but you'd need to move to another data structure to support this I suspect (lsm-tree perhaps?)

I was considering making this a "private" function on the MemDOWN prototype, but wasn't sure that it really fit in with the other DB-related functions.

Also - the tests are failing - but they're the exact same ones that are failing on current master anyway...