Optimize word count in PlainTextExtractor.
Review Request #117789 - Created April 26, 2014 and submitted
Optimize word count in PlainTextExtractor. Regular expressions are notoriously slow. Implementing a simple word-count directly in C++ is much faster, as shown by the benchmark: Before: 702.0 msecs per iteration (total: 7,020, iterations: 10) After: 125.5 msecs per iteration (total: 1,256, iterations: 10) Make the plaintext extractor benchmark more meaningful. It now operates on a larger file and uses QBENCHMARK to actually get some data.