summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/args.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/args.rs b/src/args.rs
index 63080703..77210a8f 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -131,7 +131,7 @@ Less common options:
--mmap
Search using memory maps when possible. This is enabled by default
when ripgrep thinks it will be faster. (Note that mmap searching
- doesn't current support the various context related options.)
+ doesn't currently support the various context related options.)
--no-mmap
Never use memory maps, even when they might be faster.
@@ -273,6 +273,9 @@ impl RawArgs {
false
} else if self.flag_mmap {
true
+ } else if cfg!(windows) {
+ // On Windows, memory maps appear faster than read calls. Neat.
+ true
} else {
// If we're only searching a few paths and all of them are
// files, then memory maps are probably faster.