help wanted
Description
The pretty printing algebra data structure is represented using a recursive type that is reference counted. Create a new version of this that uses a memory arena (likely a reference based one) and benchmark it to see if there is a notable performance improvement.
If this is determined as being significantly faster, we can convert the formatter and code generators over to use this new version. This would be quite a long manual job.