On 01/09/2013 22:27, Nick Wellnhofer wrote:
I went ahead with this plan in branch cfish-string-prep1. I'm currently in the
middle of step 4 and I identified a few places where immutable strings might
have a performance impact:
- The `value` field of TextTermStepper
- The `value` field of SortCache
This field is mostly used for comparisons with other Strings. If we use
a CharBuf for the `value` of TextTermStepper, we could avoid most of the
string copies by adding the following methods:
* TextTermStepper#Compare_Term
* TextTermStepper#Equals_Term
* Lexicon#Compare_Term
* Lexicon#Equals_Term
A similar approach could be used for SortCache.
> - Function S_write_terms_and_postings in PostingPool
Here we could pass a CharBuf to LexWriter#Add_Term and subsequently to
TermStepper#Write_*.
Nick