diff options
author | wl <wl> | 2010-12-26 10:43:35 +0000 |
---|---|---|
committer | wl <wl> | 2010-12-26 10:43:35 +0000 |
commit | 25a3956d72974ecdf857bd6130ac4b1fc48f4421 (patch) | |
tree | b35dfdc433c347112bb3ab65af857dee31ee0107 /src | |
parent | 5b4d44cedd5d3fa3d6149ad75e30d0ea0e987559 (diff) | |
download | groff-25a3956d72974ecdf857bd6130ac4b1fc48f4421.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ptable.h | 4 |
1 files changed, 2 insertions, 2 deletions
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: \ |