b49d7b7995
This solution gives similar performance results than the tree based one, mostly because of the intermediate vectors.