aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
Commit message (Collapse)AuthorAgeFilesLines
* 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
* benchmark: drop all bm_ prefix for legacy driver.rbk0kubun2018-07-10127-0/+0
| | | | | | benchmark/*.rb is only benchmarks now. We don't need prefixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "benchmark/*.yml: convert from benchmark/bm_*.rb"k0kubun2018-07-10255-3465/+3073
| | | | | | | | | | | | | | | This reverts r63900. Having single-execution benchmark as a normal Ruby script is preferred by ko1. I'm not a big fan of having inconsistent benchmark formats, but I can understand some benefits of it. common.mk: remove obsolsted benchmark-each PHONY declaration, support running Ruby scripts added by this commit. README.md: follow ARGS change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: resurrect peak / size metricsk0kubun2018-07-104-16/+170
| | | | | | | | | | | | | | by adding runner plugins for them. benchmark/lib/benchmark_driver/runner/peak.rb: added peak runner plugin benchmark/lib/benchmark_driver/runner/size.rb: added size runner plugin common.mk: allow using them benchmark/memory_wrapper.rb: deleted in favor of those runner plugins benchmark/README.md: document them git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: fix -e interface for v0.14 [ci skip]k0kubun2018-07-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: fully obsolete thisk0kubun2018-07-092-117/+9
| | | | | | | | | | | | in favor of just using benchmark_driver.gem. common.mk: The new `make benchmark` covers the both usages for old `make benchmark` and old `make benchmark-each`. So `make benchmark-each` is dropped now. benchmark/README.md: Explain its details git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: upgrade benchmark_driver to v0.14k0kubun2018-07-091-6/+6
| | | | | | | benchmark/driver.rb: deal with breaking changes which are actually introduced for this driver. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file_rename.yml: allow running this on mswin/mingwk0kubun2018-07-091-1/+1
| | | | | | | Suggested by MSP-Grep: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/87883 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* app_pentominio.yml: drop unnecessary preludek0kubun2018-07-091-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: make this more similark0kubun2018-07-081-19/+39
| | | | | | | | | to original benchmark-driver command. I'm going to add some runner plugins to resurrect metrics which were originally supported by benchmark/driver.rb... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: [ci skip] change syntax highlightk0kubun2018-07-081-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/README.md: [ci skip] write documentationk0kubun2018-07-082-1/+50
| | | | | | | | about this directory benchmark/driver.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: drop legacy Ruby script supportk0kubun2018-07-081-56/+12
| | | | | | | | Now all benchmarks are converted to YAMLs. common.mk: Drop obsoleted bm_* pattern git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/app_pentomino.yml: remove original scripts after __END__k0kubun2018-07-081-132/+1
| | | | | | mistakenly left by conversion script... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/*.yml: convert from benchmark/bm_*.rbk0kubun2018-07-08254-3200/+3595
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/gc: prevent GC bench from depending on normal benchmarkk0kubun2018-07-083-3/+612
| | | | | | | | scripts. This is needed to finish converting Ruby scripts to YAMLs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm2_struct_small_aset.yml: unwrap loop_countk0kubun2018-07-081-5/+9
| | | | | | since `i` is involved in this script as well... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm2_*.yml: fix ugly conversion errorsk0kubun2018-07-0826-121/+119
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm2_*.yml: abstract away the while loopk0kubun2018-07-0839-505/+384
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm1_ensure.yml: rollback loop_count abstractionk0kubun2018-07-081-3/+8
| | | | | | | | | | | for now. When measured script is really too fast, while loop substituion may return a negative benchmark result. Probably benchmark_driver.gem has rooms to be improved about this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm1_*.yml: manual fixes for ugly conversionsk0kubun2018-07-089-39/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/vm1_*.yml: abstract away the while loopk0kubun2018-07-0830-335/+241
| | | | | | | | | benchmark/driver.rb had removed the cost for while loop in benchmark/bm_vm1_*.rb, and benchmark_driver.gem can achieve the same thing with `loop_count`. But unfortunately current benchmark_driver.gem can't solve it only for vm1_yield.yml... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: convert bm_vm2_*.rb to vm2_*.ymlk0kubun2018-07-0876-481/+593
| | | | | | | | | This YAML transformation is needed to support whileloop2 time substituion by benchmark_driver.gem later. This commmit changes no benchmark behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: convert bm_vm1_*.rb to vm1_*.ymlk0kubun2018-07-0858-322/+402
| | | | | | | | | This YAML transformation is needed to support whileloop time substituion by benchmark_driver.gem later. This commmit changes no benchmark behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: fix wrong multiline regexpk0kubun2018-07-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: introduce benchmark_driver.gemk0kubun2018-07-0817-558/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.in: Clone benchmark-driver repository in benchmark/benchmark-driver `make update-benchmark-driver`, like simplecov. win32/Makefile.sub: Roughly do the same thing. .gitignore: Ignore the cloned repository. common.mk: Trigger `make update-benchmark-driver` to run `make benchmark` and adjust arguments for benchmark_driver.gem. benchmark/require.yml: renamed from benchmark/bm_require.rb, benchmark/prepare_require.rb benchmark/require_thread.yml: renamed from benchmark/bm_require_thread.rb, benchmark/prepare_require_thread.rb benchmark/so_count_words.yml: renamed from benchmark/bm_so_count_words.rb, benchmark/prepare_so_count_words.rb, benchmark/wc.input.base benchmark/so_k_nucleotide.yml: renamed from benchmark/bm_so_k_nucleotide.rb, benchmark/prepare_so_k_nucleotide.rb, benchmark/make_fasta_output.rb benchmark/so_reverse_complement.yml: renamed from benchmark/bm_so_reverse_complement.rb, benchmark/prepare_so_reverse_complement.rb, benchmark/make_fasta_output.rb I'm sorry but I made some duplications between benchmark/require.yml and benchmark/require_thread.yml, and between benchmark/so_k_nucleotide.yml and benchmark/so_reverse_complement.yml. If you're not comfortable with it, please combine these YAMLs to share the same prelude. One YAML file can have multiple benchmark definitions sharing prelude. benchmark/driver.rb: Replace its core feature with benchmark_driver.gem. Some old features are gone for now, but I'll add them again later. [Misc #14902] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: drop legacy benchmark driversk0kubun2018-07-083-233/+0
| | | | | | | | | | | | | It seems like they are all benchmark drivers but "benchmark/driver.rb" is the latest and others are no longer used. It's confusing to have multiple drivers (and actually I used benchmark/run.rb since I didn't know I should use benchmark/driver.rb). As I'm going to support only benchmark/driver.rb features in Misc#14902, let me delete them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: simplify LoadError handlingk0kubun2018-07-081-9/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/driver.rb: add CPU time measurement targetsnormal2018-06-031-3/+9
| | | | | | | | | "Real" time is too unstable on my systems, hopefully counting only CPU time can gain more reliable benchmark results. [ruby-core:87362] [Feature #14815] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/bm_*erb*: fix for --measure=size/peak in driver.rbnormal2018-05-232-24/+22
| | | | | | | | benchmark/memory_wrapper.rb will Kernel#load these scripts, preventing DATA from being initialized, so use heredoc instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `--version`.ko12018-02-211-2/+2
| | | | | | | | * benchmark/driver.rb: use `--version` instead of `-v` to get version information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Benchmarks for Array#values_atnobu2018-02-152-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Lazy Proc allocation for block parametersko12017-10-244-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Feature #14045] * insns.def (getblockparam, setblockparam): add special access instructions for block parameters. getblockparam checks VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM and if it is not set this instruction creates a Proc object from a given blcok and set VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM. setblockparam is similar to setlocal, but set VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM. * compile.c: use get/setblockparm instead get/setlocal instructions. Note that they are used for method local block parameters (def m(&b)), not for block local method parameters (iter{|&b|). * proc.c (get_local_variable_ptr): creates Proc object for Binding#local_variable_get/set. * safe.c (safe_setter): we need to create Proc objects for postponed block parameters when $SAFE is changed. * vm_args.c (args_setup_block_parameter): used only for block local blcok parameters. * vm_args.c (vm_caller_setup_arg_block): if called with VM_CALL_ARGS_BLOCKARG_BLOCKPARAM flag then passed block values should be a block handler. * test/ruby/test_optimization.rb: add tests. * benchmark/bm_vm1_blockparam*: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: apply2files releases GVLnormal2017-10-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means File.chmod, File.lchmod, File.chown, File.lchown, File.unlink, and File.utime operations on slow filesystems no longer hold up other threads. The platform-specific utime_failed changes is compile-tested using a new UTIME_EINVAL macro This hurts performance on fast filesystem, but these methods are unlikely to be performance bottlenecks and (IMHO) avoiding pathological slowdowns and stalls are more important. benchmark results: minimum results in each 3 measurements. Execution time (sec) name trunk built file_chmod 0.591 0.801 Speedup ratio: compare with the result of `trunk' (greater is better) name built file_chmod 0.737 * file.c (UTIME_EINVAL): new macro to ease compile-testing * file.c (struct apply_arg): new struct * file.c (no_gvl_apply2files): new function * file.c (apply2files): release GVL * file.c (chmod_internal): adjust for apply2files changes * file.c (lchmod_internal): ditto * file.c (chown_internal): ditto * file.c (lchown_internal): ditto * file.c (utime_failed): ditto * file.c (utime_internal): ditto * file.c (unlink_internal): ditto [ruby-core:83200] [Feature #13996] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e