From a44735aa8755cc262d212b50b6239a0030b9a948 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 24 Sep 2016 20:46:20 -0400 Subject: [PATCH] Tweak memory maps on darwin. Namely, don't automatically pick memory maps on darwin, ever. They appear slower than standard read calls. Closes #36. --- src/args.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/args.rs b/src/args.rs index 7306e0b6..418ff12b 100644 --- a/src/args.rs +++ b/src/args.rs @@ -292,6 +292,9 @@ impl RawArgs { } else if cfg!(windows) { // On Windows, memory maps appear faster than read calls. Neat. true + } else if cfg!(darwin) { + // On Mac, memory maps appear to suck. Neat. + false } else { // If we're only searching a few paths and all of them are // files, then memory maps are probably faster.