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 BurntSushi#36.
  • Loading branch information
amsharma91 committed Sep 20, 2016
1 parent 7687e40 commit e0077d4
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 e0077d4

Please sign in to comment.