optimized tfidf search 2x speedup