[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-cvs
Subject: [ruby-cvs:58212] normal:r51064 (trunk): st.c: use ccan linked-list (try 3)
From: normal () ruby-lang ! org
Date: 2015-06-29 18:10:01
Message-ID: 20150629181002.7CAFE25179 () fluorine ! ruby-lang ! org
[Download RAW message or body]
normal 2015-06-30 03:10:00 +0900 (Tue, 30 Jun 2015)
New Revision: 51064
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51064
Log:
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 ?\226?\128?\152({anonymous})?\226?\128?\153 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]
Modified files:
trunk/ChangeLog
trunk/include/ruby/st.h
trunk/st.c
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic