Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
mmap on OS X
- X-seq: zsh-workers 36998
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: mmap on OS X
- Date: Wed, 28 Oct 2015 10:49:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=JS/jY28lpwpZd9t9ApwRZz2fsEOeM616H0y5XXKHrIM=; b=rfGz342lSX1+6L7jr1dA9UBMCP3yDbzhE4RnMXJdvr4Gudbqo5XfSCM2E4L3NpWhS2 RS37Qs7Sj/vpgiSqB/ogQB4oSLY2brplPpZpI2SWhOwTtw6EMnDCGBtFGKXRtCBnn1OU JrkSayCFu+Ez5dtdU0fCrTdahekTLXhYUzTWuOPcOnFeaL2COgvZU1usLkDdZbJrGa47 uu9LrZjfaFEM/NrH4KG65Qk86ryUnIhvlIkcw/L7DjR6DHevSZ32cKVcNJK6n/UKT/Vt 9q7GASZ88iPf2XqbzgiO5hMb3zh2nNkryxCp8BTKHzUMMscm3JUmVvfDiynqDeGjasOx g1sA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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