1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/include/ruby
normal c31b0def42 st.c: use ccan linked-list (try 3)
This improves the bm_vm2_bighash benchmark significantly by
removing branches during insert, but slows down anything
requiring iteration with the more complex loop termination
checking.

Speedup ratio of 1.10 - 1.20 is typical for the vm2_bighash
benchmark.

v3 - st_head calculates list_head address in two steps
     to avoid a bug in old gcc 4.4 (Debian 4.4.7-2)
     bug which incorrectly warned with:
     warning: dereferencing pointer ‘({anonymous})’ does break
     strict-aliasing rules

* include/ruby/st.h (struct st_table): hide struct list_head
* st.c (struct st_table_entry): adjust struct
  (head, tail): remove shortcut macros
  (st_head): new wrapper function
  (st_init_table_with_size): adjust to new struct and API
  (st_clear): ditto
  (add_direct): ditto
  (unpack_entries): ditto
  (rehash): ditto
  (st_copy): ditto
  (remove_entry): ditto
  (st_shift): ditto
  (st_foreach_check): ditto
  (st_foreach): ditto
  (get_keys): ditto
  (get_values): ditto
  (st_values_check): ditto
  (st_reverse_foreach_check): ditto (unused)
  (st_reverse_foreach): ditto (unused)
  [ruby-core:69726] [Misc #10278]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29 18:10:00 +00:00
..
backward
debug.h
defines.h fix condition 2015-05-26 12:37:42 +00:00
encoding.h string.c: rb_str_new_static 2014-09-19 05:53:00 +00:00
intern.h intern.h: rb_strlen_lit 2015-06-24 03:47:10 +00:00
io.h * include/ruby/io.h (FMODE_WSPLIT): Removed. The write() system call 2014-11-18 09:10:59 +00:00
missing.h configure.in, missing.h: jemalloc mangling 2014-06-05 05:16:46 +00:00
oniguruma.h * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544 2014-09-15 16:18:41 +00:00
re.h re.c: rb_reg_region_copy 2014-12-01 21:30:58 +00:00
regex.h
ruby.h $SAFE=2 is now obsolete 2015-06-18 14:33:12 +00:00
st.h st.c: use ccan linked-list (try 3) 2015-06-29 18:10:00 +00:00
subst.h
thread.h
thread_native.h
util.h * ext/win32ole/win32ole.c: fix a typo. Patch by @davydovanton 2015-06-04 02:53:11 +00:00
version.h ruby/version.h: bump API version 2014-12-29 11:16:17 +00:00
vm.h
win32.h * file.c (File::SHARE_DELETE): new flag to be able to delete opened file 2015-06-12 12:14:06 +00:00