Replace bitwise looping with bytewise looping in hemdistsign and
Tom Lane <tgl@sss.pgh.pa.us>
Replace bitwise looping with bytewise looping in hemdistsign and sizebitvec of tsearch2, as well as identical code in several other contrib modules. This provided about a 20X speedup in building a large tsearch2 index ... didn't try to measure its effects for other operations. Thanks to Stephan Vollmer for providing a test case.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/intarray/_intbig_gist.c | modified | +24 −15 |
| contrib/intarray/_int.h | modified | +0 −5 |
| contrib/ltree/_ltree_gist.c | modified | +27 −15 |
| contrib/ltree/ltree.h | modified | +0 −8 |
| contrib/pg_trgm/trgm_gist.c | modified | +24 −15 |
| contrib/pg_trgm/trgm.h | modified | +0 −5 |
| contrib/tsearch2/gistidx.c | modified | +25 −15 |
| contrib/tsearch2/gistidx.h | modified | +0 −4 |