Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Example / partial fix for printf with math expressions
- X-seq: zsh-workers 52615
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Example / partial fix for printf with math expressions
- Date: Mon, 26 Feb 2024 09:12:50 -0800
- Archived-at: <https://zsh.org/workers/52615>
- In-reply-to: <CAH+w=7bZBQNvft8cqQ7CahMsF9=cMGEYTbpfLOidQH=4kc5HeA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Z+vjX7sAgajLsQJw2KkZtyvaZvvJ+-=-7rMFH7p9+j7g@mail.gmail.com> <20240224144041.7huny3lmihsrokdm@chazelas.org> <20240225065400.wrb3jxr7vub6t42v@chazelas.org> <CAH+w=7bZBQNvft8cqQ7CahMsF9=cMGEYTbpfLOidQH=4kc5HeA@mail.gmail.com>
On Sun, Feb 25, 2024 at 4:04 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> However, I think you could change META_HEAPDUP and META_USEHEAP to
> META_NOALLOC, becuase you're re-metafying back into the same space
> that was originally unmetafied? That might cut the performance
> penalty a lot.
No metafication:
zsh -c 'repeat 1000 printf %d 123_456+{1..10000}' > /dev/null 7.51s
user 0.39s system 99% cpu 7.907 total
USEHEAP:
Src/zsh -c 'repeat 1000 printf %d 123_456+{1..10000}' > /dev/null
8.62s user 0.59s system 99% cpu 9.218 total
NOALLOC:
Src/zsh -c 'repeat 1000 printf %d 123_456+{1..10000}' > /dev/null
7.89s user 0.36s system 99% cpu 8.255 total
All of this is with full debugging, an optimized compile might change it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author