Hi Steve, thanks for accepting the pull request. I have replied to your pull request questions and agree with much of your analysis. Feel free to improve my code :)
To summarise my thoughts: - Lazy instantiation of query spaces performs better in scenarios where remove() or removeLastN() are called. I'm not sure how often this happens in the real world. - I don't see double iteration as a major issue (it's still O(n) performance), but eager instantiation of query spaces would solve the problem.
|