[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31138: Native json slower than json.el
From: |
Eli Zaretskii |
Subject: |
bug#31138: Native json slower than json.el |
Date: |
Mon, 22 Apr 2019 16:02:49 +0300 |
> Cc: p.stephani2@gmail.com, sebastien@chapu.is, yyoncho@gmail.com,
> 31138@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Mon, 22 Apr 2019 15:24:24 +0300
>
> Thank you. Tried it, tests now pass, and the performance improvement is
> the same. I compared the same benchmark (100 iterations, GC disabled for
> the whole duration), and this patch takes
>
> src/emacs -Q --batch -l ~/examples/elisp/json-test.el
> Elapsed time: 51.153870s
>
> down to
>
> $ src/emacs -Q --batch -l ~/examples/elisp/json-test.el
> Elapsed time: 26.268435s
>
> Are you still against it? (Just checking).
I'm still against using that patch as is, yes. I'm okay with using
make_specified_string if before calling it we make sure the string is
plain ASCII or a series of proper UTF-8 sequences. Not sure how much
of a performance hit would such tests cost us, but if you are
interested, let's time them.
(Let me know if you need help in writing the code for the above 2
tests. I think parse_str_as_multibyte should help a lot.)
I guess we should also have some test case with non-ASCII characters,
if we will introduce these optimizations.
Thanks.
P.S. I'm still not sure these optimizations will make the OP happy,
since at some point I heard them saying that our present performance
is abysmally slow and inadequate. If that wasn't a wild exaggeration,
then halving the time will still be inadequate. So maybe we should
agree in advance whether 30% to 50% improvement will be "good enough",
before we embark on this adventure.
- bug#31138: Native json slower than json.el, (continued)
- bug#31138: Native json slower than json.el, Philipp Stephani, 2019/04/21
- bug#31138: Native json slower than json.el, yyoncho, 2019/04/21
- bug#31138: Native json slower than json.el, Philipp Stephani, 2019/04/21
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el,
Eli Zaretskii <=
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/23