Now that the text-2.x series has been out for a while, it's worth benchmarking to figure out what happens if we switch away from ShortText. I would expect that decode speed should improve in situations where most strings do not use escape sequences. This should happen because we would be performing a smaller number of bytearray allocations (an out-of-line primop), trading those in for known-sized allocations (which are lowered to code with a hot path that doesn't call another function). This will break the API, but I'm going to go ahead and get helper functions to ease this transition.
Now that the
text-2.xseries has been out for a while, it's worth benchmarking to figure out what happens if we switch away fromShortText. I would expect that decode speed should improve in situations where most strings do not use escape sequences. This should happen because we would be performing a smaller number of bytearray allocations (an out-of-line primop), trading those in for known-sized allocations (which are lowered to code with a hot path that doesn't call another function). This will break the API, but I'm going to go ahead and get helper functions to ease this transition.