summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2024-09-02 13:45:38 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-10-03 14:20:34 +0900
commit57282c62a0df04808d24d63a48be3774f3180763 (patch)
treedf3909768f6c86aea866d0184e32bd19022c845d /include
parent630c681321cd247a55360e52743a5d706cd46bcb (diff)
[flori/json] Optimize `fbuffer_inc_capa`
On my `JSON.dump` benchmark it shows up as 6% of runtime, compared to 40% for `convert_UTF8_to_JSON`. Since the vast majority of the time this function is called we still have some buffer capacity, we might as well check that first and skip the expensive loop etc. With this change my profiler now report this function as 0.7%, so almost 10x better. https://github.com/flori/json/commit/a7206bf2db
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11775
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions