diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-22 23:34:21 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-22 23:34:21 +0000 |
commit | ef59670a44f30df7f07dd7a1438a2c27652bcb3c (patch) | |
tree | 71d0daccc60c19f4d3a43ac3a444b6893cca2757 /ChangeLog | |
parent | 14c9cf885c2b486fcb5eade23ec4fcdc36ee87f0 (diff) | |
download | ruby-ef59670a44f30df7f07dd7a1438a2c27652bcb3c.tar.gz |
st.c: use power-of-two sizes to avoid slow modulo ops
* 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
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,19 @@ +Sun Mar 23 08:12:27 2014 Eric Wong <e@80x24.org> + + * 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 + Sat Mar 22 22:56:45 2014 NARUSE, Yui <naruse@ruby-lang.org> * addr2line.c (fill_lines): compare the file names of object in which |