Performance is ... not great. A list of performance improvements that I know need to be made:
In general, reducing allocations and doing less work is imperative, and they often go hand-in-hand.
One of the more extreme ideas I have is using JS objects and their referential semantics to aggressively memoize operations. Each function, like normalization, would generate a JS symbol, which is then used to attach extra data to objects that pass through, memoizing them. Care needs to be taken for things like typechecking that receive two arguments, probably it would only cache in an empty context.
Performance is ... not great. A list of performance improvements that I know need to be made:
In general, reducing allocations and doing less work is imperative, and they often go hand-in-hand.
One of the more extreme ideas I have is using JS objects and their referential semantics to aggressively memoize operations. Each function, like normalization, would generate a JS symbol, which is then used to attach extra data to objects that pass through, memoizing them. Care needs to be taken for things like typechecking that receive two arguments, probably it would only cache in an empty context.