Dmitry Gutov writes: > On 22.04.2019 22:52, Alex Gramiak wrote: >> The following might work, though I'm not >> sure how applicable this is now to the jansson library: > > Peformance patches are 200% better when they come together with benchmark > results. Right, I should have explained: I meant that since AFAIU the size of json_int_t is usually going to be the same size as EMACS_INT, the same code will usually be generated for json.c. It might bring a very slight benefit to other parts of Emacs, but not worth fussing over. I tried making a couple patches in other areas to json.c that I hoped would slightly improve performance, which I'll include here for posterity. The first one uses json_dumpb over json_dumps, but from what I can tell using it is either slower or just within error. The second uses the *_nocheck functions where applicable, but the results seemed to be quite similar. I suppose this means that jansson's utf-8 checking is performant. Benchmark for the first patch: (setq v ["\nasdфыв\u001f\u007ffgh\t"]) (progn (garbage-collect) (benchmark-run-compiled 100000 (json-serialize v))) Results for the first patch: 1.1050s applied vs. 1.1078s without.