functional-mos6502-web-performance
functional-mos6502-web-performance copied to clipboard
Use an optimizer for PureScript output
https://github.com/aristanetworks/purescript-backend-optimizer
Code size and performance improvement varies by usecase, but we've generally observed:
- 25-35% improvement in runtime.
- 20-25% improvement in minified bundle size.
- 15-20% improvement in minified+gzip bundle size.
I'm not entirely sure if this supplants Zephyr or not, bundle size and performance aren't going to match most production PureScript project who will be running an optimizer.
If those stats are to be believed, we would expect
Implementation | Generated code size (bytes) | Average time of 4142 instructions (ms) |
---|---|---|
JavaScript | 12,877 | 0.98 |
PureScript (opt) | 113,652 - 121,229 | 89.05 - 102.75 |
PureScript | 151,536 | 137.03 |
This would not improve standings, but might be closer to "real world".