Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: mmap on OS X



PS. The result:

...
Running [zsh-first-mmap]:                 string_test     127042,96
Running [zsh-before-first-mmap]:      string_test      75629,60

Shows that mmap is not necessarily "faster for big data". It is safer
to say that in combination with recent optimizations mmap is
beneficial.

Best regards,
Sebastian Gniazdowski


On 28 October 2015 at 10:49, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> 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



Messages sorted by: Reverse Date, Date, Thread, Author