On Aug 25, 2013, at 19:41 , Nick Wellnhofer <[email protected]> wrote:
> What about this: > > 1. Start a new branch. > 2. Rename CharBuf to String, ZombieCharBuf to StackString. > 3. Implement new CharBuf class. > 4. Switch over sites which actually need mutability to CharBuf. > 5. Remove mutating methods from String, but keep Nip/Chop for ViewCBs. > 6. Implement StringIterator. > 7. Switch from ViewCharBufs to StringIterator. > 8. Remove Nip/Chop and ViewCharBuf. > 9. Review and rewrite String class now that strings are immutable. 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 - Function S_write_terms_and_postings in PostingPool With immutable string, we'll have to allocate a new String for each term. I'm not sure whether this is acceptable. Nick
