Граф коммитов

94 Коммитов

Автор SHA1 Сообщение Дата
eregon 3557a5f85e * benchmark/bm_app_answer.rb: revert r42990, benchmark scripts should
be self-contained and avoid dependencies, especially such small one.
  See https://github.com/ruby/ruby/pull/393#issuecomment-24861301.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-22 10:01:22 +00:00
nobu 53dfd965e6 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 16:05:17 +00:00
zzak 000f39b4ff * benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393]
https://github.com/ruby/ruby/pull/393


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 14:35:32 +00:00
ko1 372272c245 * benchmark/gc/gcbench.rb: fix summary of benchmark result notaton.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 08:57:18 +00:00
ko1 45f7b78d29 * benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
GC::Profiler::disable prohibit to access profiling data. It should
  be spec bug.
  Skip GC::Profiler::report if RUBY_VERSION < '2.0.0'



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 09:31:51 +00:00
ko1 07b6816583 * benchmark/gc/gcbench.rb: stop GC::Profiler before output results.
Generating GC::Profiler result under profiling causes infinite loop.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 09:00:41 +00:00
ko1 1db64a2035 * benchmark/gc/gcbench.rb: don't use __dir__ to make compatible
with ruby 1.9.3.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 08:25:16 +00:00
ko1 8fbffe61cc * benchmark/bm_app_aobench.rb: use attr_accessor/reader instead of
defining methods.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:58:13 +00:00
nobu 5dad18386e * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:51:05 +00:00
nobu f0361ca416 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:49:15 +00:00
ko1 8e94c01653 * benchmark/bm_app_aobench.rb: added.
* benchmark/gc/aobench.rb: added.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:47:10 +00:00
nobu e832046b9a * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:31:06 +00:00
ko1 c5c1e8b8d4 * benchmark/bm_so_binary_trees.rb: disable `puts' method
and change iteration parameter to increase execution time.
* benchmark/gc/binarytree.rb: added.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:30:41 +00:00
nobu 0ec4589259 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:10:06 +00:00
ko1 fe6b76e789 * benchmark/gc/pentomino.rb: added.
Simply load pentomino puzzle in the benchmark/ directory.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:07:46 +00:00
nobu 60051eacac * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:06:05 +00:00
nobu 85797ea0a7 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:03:15 +00:00
ko1 2802afffd6 * benchmark/gc/redblack.rb: import red black tree benchmark from
https://github.com/jruby/rubybench/blob/master/time/bench_red_black.rb
* benchmark/gc/ring.rb: add a benchmark. This benchmark create many
  old objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 07:01:58 +00:00
nobu ae39bfc5dc * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 06:21:07 +00:00
ko1 99b10ff471 * benchmark/gc: create a directory to store GC related benchmark.
* benchmark/gc/gcbench.rb: moved from tool/gcbench.rb.
* benchmark/gc/hash(1|2).rb: ditto.
* benchmark/gc/rdoc.rb: ditto.
* benchmark/gc/null.rb: added.
* common.mk: fix rule.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 06:18:09 +00:00
charliesome 5d7b5481ca * benchmark/bm_hash_shift.rb: add benchmark for Hash#shift
* hash.c (rb_hash_shift): use st_shift if hash is not being iterated to
  delete element without iterating the whole hash.

* hash.c (shift_i): remove function

* include/ruby/st.h (st_shift): add st_shift function

* st.c (st_shift): ditto

[Bug #8312] [ruby-core:54524] Patch by funny-falcon

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 05:03:30 +00:00
ko1 7b918be3d4 * common.mk: specify label `built-ruby'.
* benchmark/driver.rb: quote path.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 09:30:32 +00:00
ko1 2e87867a8f * benchmark/driver.rb: accept multiple `-e'.
You don't need to use `;' separation character.
  [ruby-core:50139] [ruby-trunk - Bug #7380]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 09:19:00 +00:00
ko1 c13f83471a * benchmark/bm_so_nsieve_bits.rb: add an encoding pragma.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-21 07:15:03 +00:00
eregon ee6cfa9cca benchmark/driver.rb: fix typos and output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-17 11:07:05 +00:00
ko1 9b68747be0 * benchmark/driver.rb: add `-x' or `--exclude' option
to specify exclude benchmark name pattern.
  You can specify "-x foo" if you want to exclude the benchmarks
  if the name of benchmark contains `foo'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-24 08:46:01 +00:00
ko1 e99989bf4f * benchmark/driver.rb: remove unexpected `output'.
(commit miss)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-19 02:15:00 +00:00
ko1 f2a9c42c7a * benchmark/bmx_temp.rb: removed.
This file should not be in repository.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-19 01:23:50 +00:00
ko1 a31d53ecf5 * benchmark/driver.rb: add new option `--ruby-arg [ARG]'
which is passed as a launch parameter for each ruby's execution.
  ($ ruby [ARG] [File])



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-19 01:22:08 +00:00
ko1 aef5f90281 * benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
performance of invoking `method_missing'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17 07:26:58 +00:00
ko1 5e2625eebd * benchmark/bm_vm2_dstr.rb: add a benchmark to measure
performance of dynamic generated string ("foo#{bar}baz").



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-16 23:47:51 +00:00
ko1 db3898fe90 * benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
(invoke empty block) performance.
* benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
  method invocation with empty block.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-16 20:37:25 +00:00
ko1 f8c2a968dd * benchmark/driver.rb (show_results): Show speedup ratio
with first executables score at last of results
  if two or more executrables are given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-16 13:26:46 +00:00
ko1 64b1751194 * benchmark/driver.rb: some refactoring.
(1) Remove `average differential'.
  In this benchmark driver, We should not care about `average'.
  We use fastest score because this score should not include
  any disturbances (affections of background process, etc).
  If you care about timing affect, I recommend `median'
  score with more than 5 examinations rather than simple
  `average' score (`average' score was affected by error scores).
  (2) Show log file name.
  (3) Change default directory from './' to driver's directory.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-16 13:07:44 +00:00
kou a17cb167ea * benchmark/: add missing spaces around assignment operators (= and +=) for
consistency.
  Approved by ko1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15 12:53:12 +00:00
ko1 fd3b0dec4a * benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
* benchmark/bm_vm1_float_simple.rb: added (for flonum/float).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14 18:53:01 +00:00
ko1 b3b5e626ad * include/ruby/ruby.h: introduce flonum technique for
64bit CPU environment (sizeof(double) == sizeof(VALUE)).
  flonum technique enables to avoid double object creation
  if the double value d is in range about between
  1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
  flonum Float value is immediate and their lowest two bits
  are b10.
  If flonum is activated, then USE_FLONUM macro is 1.
  I'll write detailed in this technique on
  https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
* benchmark/bmx_temp.rb: add an benchmark for simple
  Float calculation.
* gc.c (id2ref, rb_obj_id): add flonum Float support.
* include/ruby/intern.h: move decl of rb_float_new(double)
  to include/ruby/ruby.h.
* insns.def, vm.c, vm_insnhelper.c: add flonum optimization
  and simplify source code.
* vm_insnhelper.h (FLONUM_2_P): added.
* marshal.c: support flonum output.
* numeric.c (rb_float_new_in_heap): added.
* parse.y: support flonum.
* random.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:22:40 +00:00
eregon 9955681379 * benchmark/driver.rb: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-11 15:45:54 +00:00
nagachika 77dc968e6c * benchmark/bm_vm1_lvar_init.rb: fix newline code.
* benchmark/bm_vm2_bigarray.rb: ditto.
* benchmark/bm_vm2_bighash.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 16:14:46 +00:00
ko1 7796c7d751 * benchmark/bm_vm1_lvar_init.rb: added.
This benchmark measures a initialize time of non-used variable.
* benchmark/bm_vm1_lvar_set.rb: added.
  This benchmark measures a local variables initialization time.
* benchmark/bm_vm2_bigarray.rb: added.
  This benchmark mesures a big array literal creation time.
* benchmark/bm_vm2_bighash.rb:
  This benchmark mesures a big hash literal creation time.
* benchmark/bm*: change notation "i=0" to "i = 0".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 14:41:01 +00:00
ko1 06653c1933 * benchmark/driver.rb: fix to continue benchmarks when
an error is occurred.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 04:35:11 +00:00
ko1 fbf531c4a2 * vm.c (frame_info_to_str): add `break'.
* vm.c (backtrace_object): remove lev and n parameter.
  backtrace_object always returns all of backtrace information.
* vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
  This change improve performance of caller(lev, n).
* benchmark/bm_vm3_backtrace.rb: added to check above improvement.
  FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
  and current trunk only needs 0.299sec.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 03:25:15 +00:00
ko1 3dcebce523 * vm.c: add RubyVM::Backtrace object (btobj).
Backtrace information contains an array consists of location
  information for each frames by string.
  RubyVM::Backtrace object is lightweight backtrace information,
  which contains complete information to generate traditional style
  backtrace (an array of strings) with faster generation.
  If someone accesses to backtrace information via
  Exception#backtrace, then convert a RubyVM::Backtrace object to
  traditonal style backtrace.
  This change causes incompatibility on marshal dumpped binary
  of Exception.  If you have any trouble on it, please tell us
  before Ruby 2.0 release.
  Note that RubyVM::Backtrace object should not expose Ruby level.
* error.c, eval.c, vm_eval.c: ditto.
* internal.h: ditto.
* eval_error.c: fix to skip "set_backtrace" method invocation in
  creating an exception object if it call a normal set_backtrace
  method (defined by core).
* test/ruby/test_settracefunc.rb: fix for above change.
* vm_method.c (rb_method_defined_by): added.  This function
  checks that the given object responds with the given method
  by the given cfunc.
* benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
  add to measure exception creation speed. raise1 create
  exception objects from shallow stack frame.  raise2 create
  exception objects from deep stack frame.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24 06:09:23 +00:00
ktsj 0d0344c1f0 * benchmark/driver.rb: suppress unused/shadowing variable warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-12 06:17:25 +00:00
usa b37c003e24 * benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
it is defined.  if it is not defined, assume 64 as the max of fds.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 11:24:07 +00:00
drbrain 789b288d10 * benchmark/driver.rb: Add difference column to report that averages
across all runs of a benchmark.  [Ruby 1.9 - Feature #4982]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-06 21:47:56 +00:00
kosaki f44446c45d * benchmark/bm_app_erb.rb: increase loop count. too short
mesurement time makes less accuracy.
	* benchmark/bm_app_factorial.rb: ditto.
	* benchmark/bm_app_mandelbrot.rb: ditto.
	* benchmark/bm_app_strconcat.rb: ditto.

	* benchmark/bm_io_file_create.rb: ditto.
	* benchmark/bm_io_file_read.rb: ditto.
	* benchmark/bm_io_file_write.rb: ditto.

	* benchmark/bm_so_concatenate.rb: ditto.
	* benchmark/bm_so_lists.rb: ditto.
	* benchmark/bm_so_matrix.rb: ditto.
	* benchmark/bm_so_random.rb: ditto.
	* benchmark/bm_so_sieve.rb: ditto.

	* benchmark/bm_vm_thread_mutex1.rb: ditto.
	* benchmark/bm_vm_thread_mutex2.rb: ditto.
	* benchmark/bm_vm_thread_mutex3.rb: ditto.

	* benchmark/bm_vm1_block.rb: cleanup.
	* benchmark/bm_vm1_const.rb: cleanup.
	* benchmark/bm_vm1_ensure.rb: cleanup.
	* benchmark/bm_vm1_ivar.rb: cleanup.
	* benchmark/bm_vm1_length.rb: cleanup.
	* benchmark/bm_vm1_neq.rb: cleanup.
	* benchmark/bm_vm1_not.rb: cleanup.
	* benchmark/bm_vm1_rescue.rb: cleanup.
	* benchmark/bm_vm1_simplereturn.rb: cleanup.
	* benchmark/bm_vm1_swap.rb: cleanup.

	* benchmark/bm_vm2_array.rb: cleanup.
	* benchmark/bm_vm2_case.rb: cleanup.
	* benchmark/bm_vm2_defined_method.rb: cleanup.
	* benchmark/bm_vm2_eval.rb: cleanup.
	* benchmark/bm_vm2_method.rb: cleanup.
	* benchmark/bm_vm2_mutex.rb: cleanup.
	* benchmark/bm_vm2_poly_method.rb: cleanup.
	* benchmark/bm_vm2_poly_method_ov.rb: cleanup.
	* benchmark/bm_vm2_proc.rb: cleanup.
	* benchmark/bm_vm2_regexp.rb: cleanup.
	* benchmark/bm_vm2_send.rb: cleanup.
	* benchmark/bm_vm2_super.rb: cleanup.
	* benchmark/bm_vm2_unif1.rb: cleanup.
	* benchmark/bm_vm2_zsuper.rb: cleanup.

	* benchmark/bm_vm_thread_alive_check1.rb: cleanup.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-01 10:39:12 +00:00
nobu 198c2570e7 * sytle fixes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 20:20:32 +00:00
ko1 c4becf8aaf * benchmark/bm_vm2_defined_method.rb: added to measure performance of
bmethod (method defined by define_method()).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 13:39:50 +00:00
ko1 98d45ef140 * benchmark/bm_vm4_thread_create_join.rb,
benchmark/bm_vm4_thread_mutex[1-3].rb: renamed to
  bm_thread_* (fix last rename).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 18:09:03 +00:00