Motivation:
The canonicalForm subscript was written for clarity, but it didn't do a
good job of avoiding performance costs. Unfortunately, this function can
be a bit costly, for two reasons. Firstly, it used a bunch of eager
collection operations, such that it would allocate intermediate arrays.
Secondly, it computed on the String, rather than the UTF8View backing
that string, in order to perform those collection operations. The result
was that it spent a bit too much time messing about with the headers
than it needed to.
Modifications:
- Define a lazy UTF8 view splitting sequence and use it.
- Change to compute on the UTF8View.
Result:
Better performance in the canonicalForm subscript.
Motivation:
Our 5.5 allocation counts were off. Rather than just update that by hand
we should bring over some tooling to do it automatically.
Modifications:
- Bring over and adapt the update-alloc-limits scripts from NIO.
- Run them and commit the updates.
Result:
CI should pass again.