Hi,
I've benchmarked serialization =
and parsing of JSON with and without explicit encoding. I've found that=
leaving out the coding makes both operations significantly faster =E2=80=
=93 from a speedup of a factor of 1.11 =C2=B1 0.06 for parsing canada.json =
to 1.57 =C2=B1 0.08 for serializing twitter.json. Other speedups are in bet=
ween, but the speedup is always significant (to at least one standard devia=
tion). All unit tests pass when leaving out the coding steps =E2=80=93 whic=
h isn't surprising given that currently the coding operations are expen=
sive no-ops. Therefore I'd suggest to document the internal string enco=
ding in lisp.h or character.h and remove the explicit coding in json.c and =
emacs-module.c. It's very unlikely that the internal string encoding wi=
ll change frequently, and if so, the unit tests should catch potential issu=
es caused by that.
Philipp
--94eb2c062a587c04c6056102b772--