Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mmap on OS X
- X-seq: zsh-workers 36999
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: mmap on OS X
- Date: Wed, 28 Oct 2015 11:02:07 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=K8gOiTUbWarbBNi04q82njo9Z1ZeCdzRY4LzbEoAi2g=; b=ZlPkYG7Q9jfWEa2EVdPYSCD77aKRwQY9ckkkvbYky8OCLO9vAtrd5fr88DBuAnphIh joTbTyUjYHZmzeAxwFzlUiLRa4YmDTn9Nkc1vMJ9eRhA9xTz9NDG9azMqbPt6XuyBXpC llgYgMKzhpB3vVenvMH11SayCT10Km8STwZxdqlpzTNR1afgAxYhjRe8bRs9X3FH6Ijz Dbd9lybRYXDo+6Gp5q7aeHRFds1YD6ia8nsldHpDsbSm7MSqQiqm3UqD79WhVp9c8t8t /c/ZL2j1+IVAKhrD/XS62i8JsYCJJxVptsLYm00VInXMBJRM17G6DwICXS3PEms5M+CY j/QA==
- In-reply-to: <CAKc7PVBK5J5xBvm0t1mpwwax0FbivOw+nWbLBihcph0+WxW3zw@mail.gmail.com>
- 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
- References: <CAKc7PVBK5J5xBvm0t1mpwwax0FbivOw+nWbLBihcph0+WxW3zw@mail.gmail.com>
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