anshumanv / evolutions-webapp

What? monferno is evolving!
https://evolutions.js.org
MIT License
17 stars 17 forks source link

Improve search by ID performace #20

Open anshumanv opened 6 years ago

anshumanv commented 6 years ago

We are iterating over each object to match it's num, this is poor in terms if performance, please improve it.

sneakycrowllc commented 6 years ago

What is a different way it could be done?

Monal5031 commented 6 years ago

Well we can map the values to object and then do a BST over the numbers and retrieve back the chain we need.

dericcain commented 5 years ago

I gave this a shot in #46. This was a really good case for using a lookup table.