diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-29 18:10:00 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-29 18:10:00 +0000 |
commit | c31b0def42942c7d9f61b87e9aedf665363970ae (patch) | |
tree | f35ef356f4b8b433e4283ebc54a74730a109549e /ChangeLog | |
parent | 7604ca41ff70617a605a7aabb09b128ae47ae22d (diff) | |
download | ruby-c31b0def42942c7d9f61b87e9aedf665363970ae.tar.gz |
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
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -1,3 +1,26 @@ +Tue Jun 30 02:47:02 2015 Eric Wong <e@80x24.org> + + * 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] + Mon Jun 29 17:38:01 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * insns.def (defineclass): do not quote unprintable characters at |