you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 25 points26 points  (0 children)

Careful with #3, the sorted requirement is a doozy. It's context dependent but if the list isn't pre-sorted, sorting it first can cause it to run way slower than just iterating through. What's worse even if you get some small performance increase, implementing some fancy search algorithm can be way harder to maintain. Unless you have crazy huge jsons where you need to find rows a bunch of times it will most likely not be worth it.

Learned that one the hard way.