From: dana <dana@dana.is>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: [BUG] zformat -f has no multibyte support
Date: Wed, 25 Dec 2019 22:35:05 -0600 [thread overview]
Message-ID: <8CB7B64F-BFB9-49C9-ACDD-AA60D58873E2@dana.is> (raw)
In-Reply-To: <20191224202327.or5yuftjieyq5z2o@tarpaulin.shahaf.local2>
On 24 Dec 2019, at 14:23, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Actually, I don't suppose we could just call into the printf code directly, can
> we? It _works_ (see attachment), but it's not elegant.
A very quick before/after test shows that it reduces performance quite a bit,
especially as the number of format specs increases. Admittedly, it's only a
few µs per spec in absolute numbers (at least on my Mac, with the handful of
operations i tested), and i don't know how that would compare with a
'lower-level' approach. I assume that multi-byte support will incur *some*
penalty no matter how it's done, so maybe it's reasonable, idk.
The only other thing i'd worry about is the user having to micro-manage REPLY,
but it looks like the way you've done it avoids any issues with that.
dana
next prev parent reply other threads:[~2019-12-26 4:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 22:24 zsugabubus
2019-12-24 20:23 ` Daniel Shahaf
2019-12-26 4:35 ` dana [this message]
2019-12-26 5:04 ` Daniel Shahaf
2019-12-26 11:28 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CB7B64F-BFB9-49C9-ACDD-AA60D58873E2@dana.is \
--to=dana@dana.is \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).