Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jason Zaugg
    @retronym
    sort of, althought the registry is a weak set.
    Edmund Noble
    @edmundnoble
    Oh you use weak refs?
    Guillaume Martres
    @smarter
    not in dotty
    Jason Zaugg
    @retronym
    dotty avoids hashconsing "temporary" types in the first place (like ones containing type variables)
    I've backported that to scalac but couldn't measure an improvement so shelved the work
    one thing that can be done is to eagerly clear set/maps used for internal bookkeeping of a phase. That happens by default at the end of the compilation run, but a phase could be more proactive and do this on phase completion.
    There are also opportunities to share some data structures (e.g info gleaned from the classpath) between concurrent instances of the compiler.
    Guillaume Martres
    @smarter
    hmm, cleaning up at the end of a phase might make sense yeah
    Jason Zaugg
    @retronym
    some stuff needs to be accessed later (by info transforms), but most doesn't.
    Guillaume Martres
    @smarter
    though actually looking at our phases it seems that all the local HashMap/HashSet/... are in classes that already do not live past the end of the phase
    Jason Zaugg
    @retronym
    Even better
    Miles Sabin
    @milessabin
    Hi folks ... @adriaanm is suggesting that I move the benchmark here into this project.
    Any suggestions on the best way to do that?
    (bearing in mind that in the absence of that PR the compile time will be horribly long).
    Jason Zaugg
    @retronym
    @milessabin you can add a corpus here, it won’t be run automatically unless we configure the ci to do so
    Miles Sabin
    @milessabin
    Cool.
    I'm trying that at the moment ... can you explain this structure of the corpus subdirectories? They seem to have a subdir named for a git hash which is linked to by latest?
    Jason Zaugg
    @retronym
    I think you can just drop sources in latest to start with
    Sometimes we have to vary the sources based on the vintage of the compiler
    Miles Sabin
    @milessabin
    :+1:
    How would I set the stacksize for a run?
    And heapsize too I guess.
    Jason Zaugg
    @retronym
    Add them manually to the jmh:run sbt task. Using the alias, hot -psource=corpus -jvmArgs ... -jvmArgs ...
    We don’t have a way to specify defaults per corpus
    Miles Sabin
    @milessabin
    Gotcha ... thanks.
    I'll leave the command as a comment in the source.
    Jason Zaugg
    @retronym
    Linked commit comment has transcript of how to run
    Miles Sabin
    @milessabin
    Is there any policy for when benchmarks get merged into the mainline?
    Jason Zaugg
    @retronym
    No policy, I’m very happy to have a variety of workloads
    The question would be whether we start tracking performance of a new benchmark regularly or not
    Jason Zaugg
    @retronym
    "The curious case of the abrupt compiler slowdown" https://github.com/scala/scala-dev/issues/518#issuecomment-391890188
    Performance engineering never gets boring.
    Ichoran
    @Ichoran
    That is a weird one.
    The only place I've seen that kind of thing before is with deoptimization of a hot loop handling a rare case.
    Jason Zaugg
    @retronym
    Here's how to use a microbenchmark to exercise part of scalac's internals, and use JMH profilers to look at changes in runtime and allocation rate: https://github.com/scala/scala/pull/6592#issuecomment-392665745
    We decided that those sort of benchmarks belong in scala/scala, the compiler-benchmark project will just focus on the "macro" benchmarks of compiling our test corpi and pushing results into Grafana.
    Rory Graves
    @rorygraves
    Are there a good set of benchmarks for playing with Champmap anywhere!
    ? Rather than !
    Lukas Rytz
    @lrytz
    there is some discussion and some code in scala/collection-strawman#342, but I don't know details. maybe @julienrf?
    Rory Graves
    @rorygraves
    Are there any equvilents for Map?
    Julien Richard-Foy
    @julienrf
    No. You can easily copy this one and adapt it for Maps, I guess.
    Rory Graves
    @rorygraves
    Will do. Thanks
    Miles Sabin
    @milessabin
    @retronym this CurryOn talk was pretty terrifying: https://youtu.be/hj4VmvyqbKY
    Jason Zaugg
    @retronym
    @milessabin watching, thanks for the link. We looked at that paper and associated best-practices for machine config when setting up our benchmark server. https://github.com/scala/scala-dev/issues/338#issuecomment-287980632
    Jason Zaugg
    @retronym
    On using JITWatch to analyse escape analysis: https://github.com/scala/scala-dev/issues/498#issuecomment-407241945
    Miles Sabin
    @milessabin
    @retronym understood, but the conclusions, including from the after talk chat, seemed pretty dismal.
    Jason Zaugg
    @retronym
    Non determinism of VM isn’t great for benchmarking, but stepping back from that particular problem, I believe we get better peak performance overall as a result, especially in real world workloads.
    The paper calls out counterexamples where JIT optimisations are counterproductive, but I don’t think it claims these are representative