rorygraves / scalac_perf

The Scala programming language
http://www.scala-lang.org/
16 stars 3 forks source link

stats collection in scalac #17

Open mkeskells opened 7 years ago

mkeskells commented 7 years ago

stats collection in scalac

does some work even if disabled

jvican commented 6 years ago

SCP-010 fixes this, so I guess this can be closed.

mkeskells commented 6 years ago

SCP-010 doesn't address this. Ideally stats collection should be a noop when disabled

The collection of stats and the use of asserts for development, along with developer time options is an otherhead

My idea - of which this is a part would be that the runtime didn't contain this code as was optimised as if this code path didn't happen, This could be via conditional code (e.g. a macro, or elide settings) or run time jvm optimisations ( like java asserts, or the instrumentation java plugin)

jvican commented 6 years ago

Ideally stats collection should be a noop when disabled

When disabled, stats collections is a no-op. This was done in the last implementation of SCP-010, and you can find the benchmarks in all the three PRs I opened.

mkeskells commented 6 years ago

@jvican sorry for the delay in responding - can you share these benchmarks - I dont know your PRs for SCP-010. Didnt know this extra twist in JSR 292

jvican commented 6 years ago

Sure thing! I thought you were in the loop:

  1. https://github.com/scala/scala/pull/6034
  2. https://github.com/scala/scala/pull/6051
  3. https://github.com/scala/scala/pull/6067