diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/include/ptable.h | 4 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,15 @@ +2010-12-26 Werner LEMBERG <wl@gnu.org> + + 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 <wl@gnu.org> Replace patch from 2010-12-18 with a much faster implementation. diff --git a/src/include/ptable.h b/src/include/ptable.h index 829fe5b2..d1a322cf 100644 --- a/src/include/ptable.h +++ b/src/include/ptable.h @@ -86,8 +86,8 @@ class PTABLE(T) { \ unsigned size; \ unsigned used; \ enum { \ - FULL_NUM = 2, \ - FULL_DEN = 3, \ + FULL_NUM = 1, \ + FULL_DEN = 4, \ INITIAL_SIZE = 17 \ }; \ public: \ |