aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
Commit message (Collapse)AuthorAgeFilesLines
* Improve benchmarks and tests for threads.Samuel Williams2019-06-196-11/+17
|
* Make sure to suppress .irbrc on benchmarkTakashi Kokubun2019-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | By the way, this is already improved by nobu: ``` $ benchmark-driver benchmark/irb_exec.yml --rbenv '2.6.3;2.7.0-preview1;before;after' -v 2.6.3: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] 2.7.0-preview1: ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa271df4a689dc8eb0039c929bf6ed43ff) [x86_64-linux] before: ruby 2.7.0dev (2019-06-10T21:13:14+09:00 master 973fd18f11) [x86_64-linux] after: ruby 2.7.0dev (2019-06-10T21:18:56+09:00 master 976c689ad4) [x86_64-linux] Calculating ------------------------------------- 2.6.3 2.7.0-preview1 before after irb_exec 11.868 5.872 6.297 10.278 i/s - 30.000 times in 2.527776s 5.108997s 4.764167s 2.918821s Comparison: irb_exec 2.6.3: 11.9 i/s after: 10.3 i/s - 1.15x slower before: 6.3 i/s - 1.88x slower 2.7.0-preview1: 5.9 i/s - 2.02x slower ```
* Add a benchmark of irb boot timeTakashi Kokubun2019-06-101-0/+10
| | | | | | | | | | | | | | ``` $ benchmark-driver benchmark/irb_exec.yml --rbenv '2.6.3;2.7.0-preview1' Calculating ------------------------------------- 2.6.3 2.7.0-preview1 irb_exec 11.844 5.171 i/s - 30.000 times in 2.532887s 5.801960s Comparison: irb_exec 2.6.3: 11.8 i/s 2.7.0-preview1: 5.2 i/s - 2.29x slower ```
* Optimize CGI.escapeHTML by reducing buffer extensionTakashi Kokubun2019-06-051-0/+40
| | | | | | | | | | | | | | | and switch-case branches. Buffer allocation optimization using `ALLOCA_N` would be the main benefit of patch. It eliminates the O(N) buffer extensions. It also reduces the number of branches using escape table like https://mattn.kaoriya.net/software/lang/c/20160817011915.htm. Closes: https://github.com/ruby/ruby/pull/2226 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
* Revert "Optimize CGI.escapeHTML by reducing buffer extension"Takashi Kokubun2019-06-051-40/+0
| | | | | | | This reverts commit 8d81e59aa7a62652caf85f9c8db371703668c149. `ALLOCA_N` does not check stack overflow unlike ALLOCV. I'll fix it and re-commit it again.
* Optimize CGI.escapeHTML by reducing buffer extensionTakashi Kokubun2019-06-051-0/+40
| | | | | | | | | | | | | | | and switch-case branches. Buffer allocation optimization using `ALLOCA_N` would be the main benefit of patch. It eliminates the O(N) buffer extensions. It also reduces the number of branches using escape table like https://mattn.kaoriya.net/software/lang/c/20160817011915.htm. Closes: https://github.com/ruby/ruby/pull/2226 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
* Add a benchmark using IRB::ColorTakashi Kokubun2019-06-011-0/+13
| | | | | | | I heard actually this part would not be a bottleneck for rendering because writing anything to terminal takes way longer time anyway, but I thought this benchmark script might be useful for benchmarking Ruby itself.
* Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most ↵Lourens Naudé2019-05-072-0/+2
| | | | | | pattern matches are less than or equal to 4 results Closes: https://github.com/ruby/ruby/pull/2135
* Improve performance of case-conversion methodsNobuyoshi Nakada2019-05-034-0/+40
|
* string.c: improve splitting into charsnobu2019-04-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * string.c (rb_str_split_m): improve splitting into chars by an empty string, without a regexp. Comparison: to_chars-1 built-ruby: 1273527.6 i/s compare-ruby: 189423.3 i/s - 6.72x slower to_chars-10 built-ruby: 120993.5 i/s compare-ruby: 37075.8 i/s - 3.26x slower to_chars-100 built-ruby: 15646.4 i/s compare-ruby: 4012.1 i/s - 3.90x slower to_chars-1000 built-ruby: 1295.1 i/s compare-ruby: 408.5 i/s - 3.17x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_aobench.rb: complete commented code to write the image to a fileeregon2019-01-211-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_aobench.rb: remove extra printf argumentseregon2019-01-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_aobench.rb: move `srand(0)` at the toperegon2019-01-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_aobench.rb: add `srand(0)`mame2019-01-211-0/+2
| | | | | | | To prevent noise for benchmark result. Just for the case. [Bug #15552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_aobench.rb: add a magic commentmame2019-01-211-0/+2
| | | | | | | | To support the change of default encoding. It had not worked correctly since 2.0 :-) [Bug #15552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Time.strptime benchmarksnobu2019-01-071-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: remove needless preludemrkn2019-01-061-2/+0
| | | | | | [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: add benchmark casesmrkn2019-01-061-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: add a benchmark of Range#lastmrkn2019-01-051-0/+4
| | | | | | [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/complex_float_*.yml: New benchmarksmrkn2019-01-016-0/+42
| | | | | | | Add new benchmark scripts for binary operations of Complex with float components. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete emacs mode lines [ci skip]shyouhei2018-12-278-8/+7
| | | | | | | These settings are now covered by .dir-locals.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_erb.yml: remove unused variablek0kubun2018-12-221-1/+0
| | | | | | https://github.com/ruby/ruby/commit/3efcb74036af32cbcc889d06d8c6c546289e89f4#r31762996 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add benchmark for hash small literalstenderlove2018-12-063-0/+9
| | | | | | Co-Authored-By: Krzysztof Rybka <krzysztof.rybka@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rename fiber chain benchmark.samuel2018-11-201-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2018-11-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove `Benchmark` times.samuel2018-11-201-18/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Better benchmark name.samuel2018-11-201-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2018-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix broken benchmarksamuel2018-11-201-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2018-11-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix code climate cognitive complexity issuesamuel2018-11-201-9/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2018-11-201-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rewrite fiber benchmarksamuel2018-11-201-0/+44
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use GC::Profiler on default.ko12018-09-281-1/+2
| | | | | | | | * benchmark/gc/gcbench.rb: disable GC::Profiler on default. add -p option instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add small utility for benchmarking.ko12018-09-281-0/+2
| | | | | | | | | | * benchmark/lib/load.rb: add small utility which requires benchmark-driver.rb. You can load this file and can use benchmark-driver. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make opt_str_freeze leafshyouhei2018-09-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Simply use DISPATCH_ORIGINAL_INSN instead of rb_funcall. This is, when possible, overall performant because method dispatch results are cached inside of CALL_CACHE. Should also be good for JIT. ---- trunk: ruby 2.6.0dev (2018-09-12 trunk 64689) [x86_64-darwin15] ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15] last_commit=make opt_str_freeze leaf Calculating ------------------------------------- trunk ours vm2_freezestring 5.440M 31.411M i/s - 6.000M times in 1.102968s 0.191017s Comparison: vm2_freezestring ours: 31410864.5 i/s trunk: 5439865.4 i/s - 5.77x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding Enumerator::Lazy#uniq and Enumerator::Lazy#grep_v to proc chainingnobu2018-08-166-0/+24
| | | | | | | | | | [Feature #14994] [Fix GH-1930] From: Anmol Chopra <chopraanmol1@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: skip showing --timeout option [ci skip]k0kubun2018-07-111-1/+0
| | | | | | | because it's only available for limited platforms for now. I'll make it portable and show it later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: upgrade benchmark_driverk0kubun2018-07-111-10/+10
| | | | | | | | benchmark/README.md: fix help output, which is changed on v0.14.6. Especially `e1::path1,arg1,...; e2::path2,arg2` part was wrong since `,` can't be used to split arguments anymore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: some are defined with YAML [ci skip]k0kubun2018-07-101-4/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: fix typo [ci skip]k0kubun2018-07-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: revise ERB benchmarks using YAML syntaxk0kubun2018-07-105-52/+50
| | | | | | | | | | | to improve the accuracy of measurement by stop using block. benchmark/app_erb.rb -> benchmark/app_erb.yml: renamed and revised benchmark/erb_render.rb -> benchmark/erb_render.yml: ditto benchmark/README.md: follow renames git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: erb_render is no longer yml but rb [ci skip]k0kubun2018-07-101-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: wording consistency in one sentence [ci skip]k0kubun2018-07-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* output/driver.rb: add output plugin to reproducek0kubun2018-07-101-0/+36
| | | | | | | | | | the original behavior of benchmark/driver.rb. Probably I won't use this but this is requested by ko1. Use this with: make benchmark OPTS="-o driver" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r63899k0kubun2018-07-103-612/+3
| | | | | | this is no longer needed due to r63926 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark_driver/runner: add runners for metricsk0kubun2018-07-106-1/+229
| | | | | | | | | | | supported by legacy benchmark/driver.rb. benchmark/README.md: document them common.mk: update benchmark_driver to correct 0.0 output and to fix spacing format of `-o simple` and `-o markdown`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* runner/size.rb: fix metric passed to outputk0kubun2018-07-102-1/+11
| | | | | | | | | runner/peak.rb: ditto This is needed to make commands like `make -C .ruby-svn benchmark ITEM=erb OPTS="-r size -o simple"` succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: add help output [ci skip]k0kubun2018-07-101-0/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: don't recommend alias installation [ci skip]k0kubun2018-07-101-2/+2
| | | | | | | benchmark_driver is the official way to install benchmark_driver. benchmark-driver is just an alias for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e