diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2024-09-02 13:45:38 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-10-03 14:20:34 +0900 |
| commit | 57282c62a0df04808d24d63a48be3774f3180763 (patch) | |
| tree | df3909768f6c86aea866d0184e32bd19022c845d /include/ruby/internal | |
| parent | 630c681321cd247a55360e52743a5d706cd46bcb (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/ruby/internal')
0 files changed, 0 insertions, 0 deletions
