> Any idea on how to improve lookUp? [Use a concurrent cache][1]. The point is, regardless how good or bad you lookup function is, nothing beats a cache-hit performance wise.. > Is there a better way to do simple caching than using withDefault to > mutate the underlying map? getOrElseUpdate(key, value) [1]: https://gist.github.com/brikis98/5842766