groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff ChangeLog src/include/ptable.h


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog src/include/ptable.h
Date: Sun, 26 Dec 2010 10:43:35 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     10/12/26 10:43:35

Modified files:
        .              : ChangeLog 
        src/include    : ptable.h 

Log message:
        Speed up troff.
        
        * src/include/ptable.h (PTABLE): Make hash tables much more sparse
        by changing `FULL_NUM' from 3 to 1.  This increases the allocated
        memory by about 200kByte (which is nothing today) but assures that
        there aren't extremely long searches for a free hash slot in case
        that the hash function doesn't return a free one.  Due to the nature
        of the entries in uniuni.cpp, the used hash function in ptable.cpp
        is not optimal, but using a sparse array compensates this.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1263&r2=1.1264
http://cvs.savannah.gnu.org/viewcvs/groff/src/include/ptable.h?cvsroot=groff&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1263
retrieving revision 1.1264
diff -u -b -r1.1263 -r1.1264
--- ChangeLog   20 Dec 2010 22:57:04 -0000      1.1263
+++ ChangeLog   26 Dec 2010 10:43:35 -0000      1.1264
@@ -1,3 +1,15 @@
+2010-12-26  Werner LEMBERG  <address@hidden>
+
+       Speed up troff.
+
+       * src/include/ptable.h (PTABLE): Make hash tables much more sparse
+       by changing `FULL_NUM' from 3 to 1.  This increases the allocated
+       memory by about 200kByte (which is nothing today) but assures that
+       there aren't extremely long searches for a free hash slot in case
+       that the hash function doesn't return a free one.  Due to the nature
+       of the entries in uniuni.cpp, the used hash function in ptable.cpp
+       is not optimal, but using a sparse array compensates this.
+
 2010-12-20  Werner LEMBERG  <address@hidden>
 
        Replace patch from 2010-12-18 with a much faster implementation.

Index: src/include/ptable.h
===================================================================
RCS file: /cvsroot/groff/groff/src/include/ptable.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/include/ptable.h        5 Jan 2009 20:11:00 -0000       1.10
+++ src/include/ptable.h        26 Dec 2010 10:43:35 -0000      1.11
@@ -86,8 +86,8 @@
   unsigned size;                                                             \
   unsigned used;                                                             \
   enum {                                                                     \
-    FULL_NUM = 2,                                                            \
-    FULL_DEN = 3,                                                            \
+    FULL_NUM = 1,                                                            \
+    FULL_DEN = 4,                                                            \
     INITIAL_SIZE = 17                                                        \
   };                                                                         \
 public:                                                                        
      \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]