@@ -51,22 +51,23 @@ void bench_tokens(strings_type const &strings) {
5151 auto const &s = strings;
5252
5353 // StringZilla structures
54- bench<std::map<sz::string, int >>(" map<sz::string>" , s);
55- bench<std::map<sz::string_view, int >>(" map<sz::string_view>" , s);
56- bench<std::unordered_map<sz::string, int >>(" unordered_map <sz::string>" , s);
57- bench<std::unordered_map<sz::string_view, int >>(" unordered_map <sz::string_view>" , s);
54+ bench<std::map<sz::string, int >>(" std:: map<sz::string>" , s);
55+ bench<std::map<sz::string_view, int >>(" std:: map<sz::string_view>" , s);
56+ bench<std::unordered_map<sz::string, int >>(" std::umap <sz::string>" , s);
57+ bench<std::unordered_map<sz::string_view, int >>(" std::umap <sz::string_view>" , s);
5858
5959 // Pure STL
60- bench<std::map<std::string, int >>(" map<std::string>" , s);
61- bench<std::map<std::string_view, int >>(" map<std::string_view>" , s);
62- bench<std::unordered_map<std::string, int >>(" unordered_map <std::string>" , s);
63- bench<std::unordered_map<std::string_view, int >>(" unordered_map <std::string_view>" , s);
60+ bench<std::map<std::string, int >>(" std:: map<std::string>" , s);
61+ bench<std::map<std::string_view, int >>(" std:: map<std::string_view>" , s);
62+ bench<std::unordered_map<std::string, int >>(" std::umap <std::string>" , s);
63+ bench<std::unordered_map<std::string_view, int >>(" std::umap <std::string_view>" , s);
6464
6565 // STL structures with StringZilla operations
66- // bench<std::map<std::string, int, sz::less>>("map<std::string>", s);
67- // bench<std::map<std::string_view, int, sz::less>>("map<std::string_view>", s);
68- // bench<std::unordered_map<std::string, int, sz::hash, sz::equal_to>>("unordered_map<std::string>", s);
69- // bench<std::unordered_map<std::string_view, int, sz::hash, sz::equal_to>>("unordered_map<std::string_view>", s);
66+ bench<std::map<std::string, int , sz::less>>(" std::map<std::string, sz::less>" , s);
67+ bench<std::map<std::string_view, int , sz::less>>(" std::map<std::string_view, sz::less>" , s);
68+ bench<std::unordered_map<std::string, int , sz::hash, sz::equal_to>>(" std::umap<std::string, sz::hash>" , s);
69+ bench<std::unordered_map<std::string_view, int , sz::hash, sz::equal_to>>(" std::umap<std::string_view, sz::hash>" ,
70+ s);
7071}
7172
7273int main (int argc, char const **argv) {
@@ -77,6 +78,8 @@ int main(int argc, char const **argv) {
7778 // Baseline benchmarks for real words, coming in all lengths
7879 std::printf (" Benchmarking on real words:\n " );
7980 bench_tokens (dataset.tokens );
81+ std::printf (" Benchmarking on real lines:\n " );
82+ bench_tokens (dataset.lines );
8083
8184 // Run benchmarks on tokens of different length
8285 for (std::size_t token_length : {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 16 , 32 }) {
0 commit comments