checkout the new opencv.
in real world data, in lower dimension, spill tree outperform bbf by an order of computing time.
spill tree approximation result in 4 ms
best-bin-first approximation result in 20 ms
naive search result in 61 ms
test data can be found in: http://kdd.ics.uci.edu/databases/CorelFeatures/CorelFeatures.html
the test was done with LayoutHistogram.asc file.