performance - What does the 'optimise' scala compiler flag do? -
performance - What does the 'optimise' scala compiler flag do? -
i've tried using scalac -optimise
version 2.7.7. @ time never got performance improvements, compilation took longer.
is situation improve in scala 2.9.0 ? optimisations covered flag ?
strange, there similar question on scala-user group:
rex kerr answered @ time (may):
i have never found case production code sped using -optimise
, @ to the lowest degree when using sun jvm. grant in cases happen, seems apply similar optimizations jvm already. perhaps if there limits on optimization depth, using -optimise remove few layers , allow jvm few more. don't bother testing more, given how many cases (dozens) i've tried runtime hasn't changed measurably.
i expect have impact on vms more conservative (e.g. jrockit) or less sophisticated (e.g. dalvik).
ismael juma added:
the scala distribution compiled -optimise, indeed it's not on unless argument passed scalac.
is not mature enough, or lead bugs, changed semantic, etc ?
as far understand, team decided conservative , enable scala distribution initial step (in scala 2.8.0). maybe it's thought consider extending in next major release.
for influence of '-optimise
' (amongst other factors) in scala2.9, see scala-language thread called "scala2.9 slower?".
i'm bit concerned. after seeing -optimize
optimize "for comprehensions" on 2.9.0, benchmarked code, , discovered 2.5 times slower 2.8.1.
the results leave a... mixed feeling.
performance scala compiler-construction compiler-optimization
Comments
Post a Comment