summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2024-09-04 12:38:30 +0200
committerJean Boussier <jean.boussier@gmail.com>2024-09-04 14:52:55 +0200
commita3f589640fd443deea230c27efd6bdfc92f5817f (patch)
treed73fc39594b681496e6f3525577654352c061355 /test/ruby
parent83334ebb3c8056534974873b528f44fc0622cd22 (diff)
Time#strftime: grow the buffer faster
Use a classic doubling of capacity rather than only adding twice as much capacity as is already known to be needed. ``` compare-ruby: ruby 3.4.0dev (2024-09-04T09:21:53Z opt-strftime-2 ae98d19cf9) +YJIT [arm64-darwin23] built-ruby: ruby 3.4.0dev (2024-09-04T11:46:02Z opt-strftime-growth 586263d6fb) +YJIT [arm64-darwin23] warming up... | |compare-ruby|built-ruby| |:---------------------------|-----------:|---------:| |time.strftime("%FT%T") | 1.754M| 1.889M| | | -| 1.08x| |time.strftime("%FT%T.%3N") | 1.508M| 1.749M| | | -| 1.16x| |time.strftime("%FT%T.%6N") | 1.488M| 1.756M| | | -| 1.18x| compare-ruby: ruby 3.4.0dev (2024-09-04T09:21:53Z opt-strftime-2 ae98d19cf9) +YJIT [arm64-darwin23] built-ruby: ruby 3.4.0dev (2024-09-04T09:21:53Z opt-strftime-2 ae98d19cf9) +YJIT [arm64-darwin23] warming up... ```
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11542
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions