diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-02 14:40:47 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-02 14:40:47 +0000 |
| commit | fb86d34c95768e5213461de776aec6564a4e46f4 (patch) | |
| tree | f2ad7c4f38fda035debf8d3ce1afd91c2b0c3f7b /include/ruby | |
| parent | fc34402ab2126a7061d912131a49c1a156fa73df (diff) | |
| download | ruby-fb86d34c95768e5213461de776aec6564a4e46f4.tar.gz ruby-fb86d34c95768e5213461de776aec6564a4e46f4.tar.xz ruby-fb86d34c95768e5213461de776aec6564a4e46f4.zip | |
* include/ruby/st.h (struct st_table): make num_entries bitfield
instead of num_bins for speed. num_entries has less access.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
| -rw-r--r-- | include/ruby/st.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h index 3b64bd72f..93089b0d3 100644 --- a/include/ruby/st.h +++ b/include/ruby/st.h @@ -54,9 +54,9 @@ typedef st_data_t st_index_t; struct st_table { const struct st_hash_type *type; + st_index_t num_bins; unsigned int entries_packed : 1; - st_index_t num_bins : ST_INDEX_BITS - 1; - st_index_t num_entries; + st_index_t num_entries : ST_INDEX_BITS - 1; struct st_table_entry **bins; struct st_table_entry *head; }; |
