[前][次][番号順一覧][スレッド一覧]

ruby-changes:1848

From: ko1@a...
Date: 2 Sep 2007 23:41:06 +0900
Subject: [ruby-changes:1848] akr - Ruby:r13339 (trunk): * include/ruby/st.h (struct st_table): make num_entries bitfield

akr	2007-09-02 23:40:47 +0900 (Sun, 02 Sep 2007)

  New Revision: 13339

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/st.h

  Log:
    * include/ruby/st.h (struct st_table): make num_entries bitfield
      instead of num_bins for speed.  num_entries has less access.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/st.h?r1=13339&r2=13338
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13339&r2=13338

Index: include/ruby/st.h
===================================================================
--- include/ruby/st.h	(revision 13338)
+++ include/ruby/st.h	(revision 13339)
@@ -54,9 +54,9 @@
 
 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;
 };
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13338)
+++ ChangeLog	(revision 13339)
@@ -1,3 +1,8 @@
+Sun Sep  2 23:38:29 2007  Tanaka Akira  <akr@f...>
+
+	* include/ruby/st.h (struct st_table): make num_entries bitfield
+	  instead of num_bins for speed.  num_entries has less access.
+
 Sun Sep  2 00:37:57 2007  Tadayoshi Funaba  <tadf@d...>
 
 	* lib/date/format.rb (_parse): improved parsing of ordinal dates.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]