by hellofunk · 6y ago · 0 comments
I always thought that package size was just one of the benefits of advanced compilation. It also does other nifty things, like automatically unrolling loops, inlining functions, etc. Those have actual benefits on runtime performance don’t they?
In the benchmarks of Scala.js [1], another compiler that uses GCC behind the scenes, we have shown that:
* the GCC optimizer alone often introduces performance improvements (not always, and sometimes it worsens performance)
* our optimizer does better than GCC on its own
* the combination of both does not improve over using only our own optimizer
Scala.js uses GCC essentially for its code size improvements, not for its impact on run-time performance.
[1] https://www.scala-js.org/doc/internals/performance.html#in-p...