diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-02-27 18:34:44 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-02-27 18:34:44 +0000 |
commit | e56c41f47d43103a6e8bf744e12229ed6e5a8f19 (patch) | |
tree | 39be4124610edf8072206aa85b178b8fe3eab2e2 /src/main/getopt.cpp | |
parent | 14c22833d05f632eb40eb68cc3c68345d891005c (diff) |
Adding --mmap option to use memory-mapped file input, which provides a marginal improvement (<5%) on big benchmarks.
Diffstat (limited to 'src/main/getopt.cpp')
-rw-r--r-- | src/main/getopt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/getopt.cpp b/src/main/getopt.cpp index 7ca889592..baad6fe31 100644 --- a/src/main/getopt.cpp +++ b/src/main/getopt.cpp @@ -67,6 +67,7 @@ enum OptionValue { SEGV_NOSPIN, PARSE_ONLY, NO_CHECKING, + USE_MMAP, SHOW_CONFIG };/* enum OptionValue */ @@ -103,6 +104,7 @@ static struct option cmdlineOptions[] = { { "segv-nospin", no_argument , NULL, SEGV_NOSPIN }, { "parse-only" , no_argument , NULL, PARSE_ONLY }, { "no-checking", no_argument , NULL, NO_CHECKING }, + { "mmap", no_argument , NULL, USE_MMAP }, { "show-config", no_argument , NULL, SHOW_CONFIG } };/* if you add things to the above, please remember to update usage.h! */ @@ -219,6 +221,10 @@ throw(OptionException) { opts->semanticChecks = false; break; + case USE_MMAP: + opts->memoryMap = true; + break; + case SHOW_CONFIG: fputs(Configuration::about().c_str(), stdout); printf("\n"); |