From: gamelinks007@... Date: 2020-08-30T13:10:36+00:00 Subject: [ruby-core:99779] [Ruby master Feature#17135] Improve perfomance for Integer#size method Issue #17135 has been reported by S_H_ (Shun Hiraoka). ---------------------------------------- Feature #17135: Improve perfomance for Integer#size method https://bugs.ruby-lang.org/issues/17135 * Author: S_H_ (Shun Hiraoka) * Status: Open * Priority: Normal ---------------------------------------- `Integer#size` seem can improve parfomance by write in ruby code. benchmark: ```yml prelude: | n = 42 benchmark: size: | n.size loop_count: 20000000 ``` result: ```bash sh@MyComputer:~/rubydev/build$ make benchmark/integer_size.yml -e COMPARE_RUBY=~/.rbenv/shims/ruby -e BENCH_RUBY=../install/bin/ruby # Iteration per second (i/s) | |compare-ruby|built-ruby| |:-----|-----------:|---------:| |size | 65.749M| 87.117M| | | -| 1.33x| ``` `COMPARE_RUBY` is `ruby 2.8.0dev (2020-08-28T10:47:29Z master 7e1fddba4a) [x86_64-linux]`. `BENCH_RUBY` is patched. -- https://bugs.ruby-lang.org/ Unsubscribe: