summaryrefslogtreecommitdiff
path: root/debug_counter.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-01-11 14:25:34 -0500
committerPeter Zhu <peter@peterzhu.ca>2023-01-12 09:06:15 -0500
commitbfc887f391fde6de9d088039509f6e3eaa40b3ca (patch)
tree9e5604354b561dbb8ce350aac40bb6c36e235148 /debug_counter.h
parent207f8d0027d679780d4f3962c305d36885feb652 (diff)
downloadruby-bfc887f391fde6de9d088039509f6e3eaa40b3ca.tar.gz
Add str_enc_copy_direct
This commit adds str_enc_copy_direct, which is like str_enc_copy but does not check the frozen status of str1 and does not check the validity of the encoding of str2. This makes certain string operations ~5% faster. ```ruby puts(Benchmark.measure do 100_000_000.times do "a".downcase end end) ``` Before this patch: ``` 7.587598 0.040858 7.628456 ( 7.669022) ``` After this patch: ``` 7.133128 0.039809 7.172937 ( 7.183124) ```
Diffstat (limited to 'debug_counter.h')
0 files changed, 0 insertions, 0 deletions