From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: String encoding in json.c
Date: Tue, 26 Dec 2017 21:50:33 +0000 [thread overview]
Message-ID: <CAArVCkTRg=oAZ5y=PL2gB5N+bizacaFR-hN5grke5TOP+bPQqg@mail.gmail.com> (raw)
In-Reply-To: <83efnihzse.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
Eli Zaretskii <eliz@gnu.org> schrieb am Di., 26. Dez. 2017 um 05:35 Uhr:
>
> > I'm not sure which encoding speeds json.c allows us now.
>
> Well, Philipp measured it, so maybe he could share the benchmarks and
> the results.
>
json.el itself got some speedups from the time of that bug report, as
Dmitry mentioned in the bug.
My benchmark is a relatively dumb microbenchmark that calls the JSON
functions 20 times on the data files in nativejson-benchmark. Then I ran
that code through the `bench' program, which does some basic statistical
analysis. Serialization is in all cases more than 5 times faster, with a
high significance.
>
> > But the JSON structure I was talking about is not written to a file.
> > It's sent over the network (usually to a local TCP socket).
>
> In that case, encoding it is not a wasted effort, since it would have
> been otherwise encoded when we send it.
>
If that turns out to be a problem, we might consider returning a unibyte
string to avoid further encoding.
[-- Attachment #2: Type: text/html, Size: 1481 bytes --]
next prev parent reply other threads:[~2017-12-26 21:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 14:26 String encoding in json.c Philipp Stephani
2017-12-23 14:43 ` Eli Zaretskii
2017-12-23 15:31 ` Philipp Stephani
2017-12-23 15:53 ` Eli Zaretskii
2017-12-23 17:27 ` Philipp Stephani
2017-12-23 18:18 ` Eli Zaretskii
2017-12-26 21:42 ` Philipp Stephani
2017-12-27 16:08 ` Eli Zaretskii
2017-12-24 20:48 ` Dmitry Gutov
2017-12-25 16:21 ` Eli Zaretskii
2017-12-25 20:51 ` Dmitry Gutov
2017-12-26 4:35 ` Eli Zaretskii
2017-12-26 21:50 ` Philipp Stephani [this message]
2017-12-27 2:00 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkTRg=oAZ5y=PL2gB5N+bizacaFR-hN5grke5TOP+bPQqg@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.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.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).