summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2022-07-21 13:16:16 +0200
committerJean Boussier <[email protected]>2022-07-21 15:06:50 +0200
commitf954c5dae4c144207bd366cbc832d08930882b23 (patch)
tree76c47ab722e4a6be9bfc0097e42ff2f9cb10b82a /debug.c
parent80672b2d0e0f8e3c43446f5833b1a3491460e215 (diff)
string.c: use str_enc_fastpath in TERM_LEN
Not having to fetch the rb_encoding save a significant amount of time. Additionally, even when we have to fetch it, we can do it faster using `ENCODING_GET` rather than `rb_enc_get`. ``` compare-ruby: ruby 3.2.0dev (2022-07-19T08:41:40Z master cb9fd920a3) [arm64-darwin21] built-ruby: ruby 3.2.0dev (2022-07-21T11:16:16Z faster-buffer-conc.. 4f001f0748) [arm64-darwin21] warming up... | |compare-ruby|built-ruby| |:---------------------|-----------:|---------:| |binary_concat_utf8 | 510.580k| 565.600k| | | -| 1.11x| |binary_concat_binary | 512.653k| 571.483k| | | -| 1.11x| |utf8_concat_utf8 | 511.396k| 566.879k| | | -| 1.11x| ```
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6160
Diffstat (limited to 'debug.c')
0 files changed, 0 insertions, 0 deletions