Improve FastString memory behaviour
This PR changes the FastString implemetation to use ShortByteString
instead of ByteString
and removes the cache for lengthFS
. It also pulls in the lazy z-encoding cache PR !1039 (closed).
There are multiple reasons we want this:
- Fewe allocations: ByteString has 3 fields, ShortByteString just has one and removing fs_nchars removes another one.
- ByteString memory is pinned:
- This can cause fragmentation issues (see for example #13110) but also
- makes using FastStrings in compact regions impossible.
Edited by Daniel Gröber (dxld)