zsh-workers
 help / color / mirror / code / Atom feed
* mmap on OS X
@ 2015-10-28  9:49 Sebastian Gniazdowski
  2015-10-28 10:02 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2015-10-28  9:49 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
the patch 1f62d8d (34451) introduced mmap on OS X. This caused a
slowdown which I and Bart identified. Then the patch has been recently
reverted with 8934007 (36956), however before that a few optimizations
have been introduced. It turned out that they smoothed out effect of
34451. Starting from 9f8e3e8 (36834) mmap was no longer slowing things
down. I also checked the update of 36834, which is patch 506d592
(36943), and it's the same.

With the patch reverted the situation is as follows:
- for small data there is no change
- for large data reverted version is slower

So the whole thing is like this:
- OS X mmap is slower for smaller data
- recent optimizations smooth this out
- OS X mmap is faster for large data

So by restoring mmap use we have all cases covered and full performance.


Results for big data (max string size 1350000):
*Running [zsh-withmmap]:                  string_test      57625,00
Running [zsh-withoutmmap]:             string_test      85235,24
Running [zsh-first-mmap]:                 string_test     127042,96
Running [zsh-before-first-mmap]:      string_test      75629,60

Results for small data (max string size 225000):
Running [zsh-withmmap]:                  string_test       1496,85
Running [zsh-withoutmmap]:             string_test       1595,89
**Running [zsh-first-mmap]:                 string_test       3790,70
Running [zsh-before-first-mmap]:      string_test       1496,02

It can be seen that for small data the slowdown of ** is smoothed out
in recent Zsh, while for large data mmap in recent Zsh gives speed up
(*).

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-28 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28  9:49 mmap on OS X Sebastian Gniazdowski
2015-10-28 10:02 ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).