Skip to content

Commit

Permalink
Tweak memory maps on darwin.
Browse files Browse the repository at this point in the history
Namely, don't automatically pick memory maps on darwin, ever. They
appear slower than standard read calls.

Closes #36.
  • Loading branch information
BurntSushi committed Sep 25, 2016
1 parent 6b2efd4 commit a44735a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a44735a

Please sign in to comment.