Add a rg (no mmap) benchmark.

This is added to the subtitle benchmark. The purpose is to demonstrate
how memory mapping a single file for search is faster.
This commit is contained in:
Andrew Gallant
2016-09-21 21:42:34 -04:00
parent 263e2b012f
commit c1c484d1a7
3 changed files with 242 additions and 218 deletions

View File

@@ -397,6 +397,7 @@ def bench_subtitles_en_literal(suite_dir):
return Benchmark(pattern=pat, commands=[
Command('rg', ['rg', pat, en]),
Command('rg (no mmap)', ['rg', '--no-mmap', pat, en]),
Command('pt', ['pt', '-N', pat, en]),
Command('sift', ['sift', pat, en]),
Command('grep', ['grep', '-a', pat, en], env=GREP_ASCII),
@@ -558,6 +559,7 @@ def bench_subtitles_ru_literal(suite_dir):
return Benchmark(pattern=pat, commands=[
Command('rg', ['rg', pat, ru]),
Command('rg (no mmap)', ['rg', '--no-mmap', pat, ru]),
Command('pt', ['pt', '-N', pat, ru]),
Command('sift', ['sift', pat, ru]),
Command('grep', ['grep', '-a', pat, ru], env=GREP_ASCII),