Age | Commit message (Collapse) | Author |
|
Dynamic symbols hash more slowly because they need extra method
dispatch in rb_any_hash. I am not sure if dynamic symbols are
a realistic use case as hash keys, so this commit only
restores performance when comparing against versions of Ruby
which lack dsyms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* benchmark/bm_app_aobench.rb: update outdated links to the
original program. [ruby-dev:48550] [Feature #10247]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* proc.c (rb_proc_alloc): inline and move to vm.c
(rb_proc_wrap): new wrapper function used by rb_proc_alloc
(proc_dup): simplify alloc + copy + wrap operation
[ruby-core:64994]
* vm.c (rb_proc_alloc): new inline function
(rb_vm_make_proc): call rb_proc_alloc
* vm_core.h: remove rb_proc_alloc, add rb_proc_wrap
* benchmark/bm_vm2_newlambda.rb: short test to show difference
First we allocate and populate an rb_proc_t struct inline to avoid
unnecessary zeroing of the large struct. Inlining speeds up callers as
this takes many parameters to ensure correctness. We then call the new
rb_proc_wrap function to create the object.
rb_proc_wrap - wraps a rb_proc_t pointer as a Ruby object, but
we only use it inside rb_proc_alloc. We must call this before
the compiler may clobber VALUE parameters passed to rb_proc_alloc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
a string, but an array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
This program is described closely in "Understanding Computation"
chapter 6 by Tom Stuart. <http://computationbook.com/>
Japanese translation will be published soon.
<http://www.oreilly.co.jp/books/9784873116976/>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* benchmark/bm_securerandom.rb: benchmark script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* benchmark/prepare_so_reverse_complement.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table. I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:
1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
(0002 patch in Feature 9632 will introduce a secondary list
for waiting FDs)
This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.
vm_thread_close 1.762
* vm_core.h (rb_vm_t): list_head and counter for living_threads
(rb_thread_t): vmlt_node for living_threads linkage
(rb_vm_living_threads_init): new function wrapper
(rb_vm_living_threads_insert): ditto
(rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
[ruby-core:61871][Feature 9632 (part 1)]
Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
specified file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
raw results into FILE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
is available to run benchmark driver on ruby 1.9.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* st.c (hash_pos): use bitwise AND to avoid slow modulo op
(new_size): power-of-two sizes for hash_pos change
(st_numhash): adjust for common keys due to lack of prime modulo
[Feature #9425]
* hash.c (rb_any_hash): right shift for symbols
* benchmark/bm_hash_aref_miss.rb: added to show improvement
* benchmark/bm_hash_aref_sym_long.rb: ditto
* benchmark/bm_hash_aref_str.rb: ditto
* benchmark/bm_hash_aref_sym.rb: ditto
* benchmark/bm_hash_ident_num.rb: added to prevent regression
* benchmark/bm_hash_ident_obj.rb: ditto
* benchmark/bm_hash_ident_str.rb: ditto
* benchmark/bm_hash_ident_sym.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* benchmark/driver: avoid large alloc in driver process
[ruby-core:59869] [Bug #9430]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/fiddle/lib/fiddle/import.rb: ditto
* ext/psych/lib/psych.rb: ditto
* ext/psych/lib/psych/nodes/sequence.rb: ditto
* ext/tk/lib/multi-tk.rb: ditto
* ext/tk/lib/tcltk.rb: ditto
Closes GH-490
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
s/accross/across/
[ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
for not MRI 2.1.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
than 2.0.0p353.
* benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
than 2.0.0p353.
* benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
than 2.0.0p353.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
These GC benchmarks do not reflect practical applications.
They are only for tuning.
* benchmark/bm_vm1_gc_short_with_complex_long.rb: added.
* benchmark/bm_vm1_gc_short_with_long.rb: added.
* benchmark/bm_vm1_gc_short_with_symbol.rb: added.
* benchmark/bm_vm1_gc_wb_ary.rb: added.
* benchmark/bm_vm1_gc_wb_obj.rb: added.
* benchmark/bm_vm_thread_queue.rb: added.
Thie benchmark is added to know how fast C verion of thread.so.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
https://github.com/ruby/ruby/pull/393
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
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
|
|
with ruby 1.9.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
defining methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* benchmark/gc/aobench.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* 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
|
|
* 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
|
|
* benchmark/driver.rb: quote path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|