yahoo/routr — pull request #5 by ptomasroos (2014-10-09 21:31:26+00:00)
Title: Added test to measure many routes

The current implementation of the lookup is very naive.

I suggest either we do array lookup with a predictable pattern string instead of for each key.match
Or one can take a dependency on a trie datastructure which may be a bit more optimized.

I've created a simple test in my local branch called array-lookup which reduces the lookup time from 124ms to ~2ms for 100.000 routes.