Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:48
    SethTisue commented #11739
  • 01:48
    SethTisue labeled #11739
  • 01:10
    retronym review_requested #8411
  • Sep 15 22:44
    som-snytt commented #8420
  • Sep 15 22:43
    som-snytt review_requested #8420
  • Sep 15 21:30
    neko-kai opened #11739
  • Sep 15 18:54
    scala-jenkins milestoned #8420
  • Sep 15 18:54
    som-snytt opened #8420
  • Sep 15 17:37

    SethTisue on master

    fix bad link (compare)

  • Sep 15 16:59
    som-snytt commented #11736
  • Sep 15 14:31
    SethTisue synchronize #976
  • Sep 15 14:24
    SethTisue synchronize #976
  • Sep 15 14:01
    SethTisue commented #976
  • Sep 15 12:10
    plokhotnyuk edited #11738
  • Sep 15 12:09
    plokhotnyuk edited #11738
  • Sep 15 12:02
    plokhotnyuk edited #11738
  • Sep 15 12:01
    plokhotnyuk edited #11738
  • Sep 15 11:53
    Ichoran commented #11738
  • Sep 15 04:57
    plokhotnyuk opened #11738
  • Sep 14 23:32

    SethTisue on 2.13.x

    add squants (#974) pureconfig: exclude squants sub… Merge remote-tracking branch 'o… (compare)

Guillaume Martres
@smarter
particularly Java 8 default of ParallelGC vs Java 9+ default G1GC
Li Haoyi
@lihaoyi-databricks
it's a compile benchmark so we don't care about latencies or pauses or any of that stuff
i heard parallel was still the best for raw throughput
Guillaume Martres
@smarter
On Java 9, I observed the compiler being 20% slower
switching back to ParallelGC fixed that
haven't rebenchmarked since then
Li Haoyi
@lihaoyi-databricks
i forced parallel GC with a flag for all those benches
Guillaume Martres
@smarter
ok, that makes things easier to comapre
Andriy Plokhotnyuk
@plokhotnyuk
Here are results of ~1K benchmarks for latest versions of JSON parsers on latest builds of JDK 8, JDK 11, JDK 13, JDK 13 + Graal, GraalVM CE 19.2, GraalVM EE 19.2 on Intel® Core™ i7-7700 CPU @ 3.6GHz (max 4.2GHz), RAM 16Gb DDR4-2400, Ubuntu 18.04.
All sources, including launching scripts are here
Diego E. Alonso Blas
@diesalbla

On Java 9, I observed the compiler being 20% slower

@smarter What about inlining (I was asking recently about that)? Have you found any JVM flags that can speed up the Scala Compiler, particularly?

Guillaume Martres
@smarter
when using the plain JDK, -XX:MaxInlineLevel helps Scala code a bit usually
you can set it pretty high, -XX:MaxInlineLevel=35
when using Graal, you don't need to tweak anything, it already does a ton of inlining
Diego E. Alonso Blas
@diesalbla
Do you also tweak any of the other parameters?
java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version | grep Inline
     bool C1ProfileInlinedCalls                    = true                                   {C1 product} {default}
     bool DebugInlinedCalls                        = true                                {C2 diagnostic} {default}
     intx FreqInlineSize                           = 325                                    {pd product} {default}
     bool IncrementalInline                        = true                                   {C2 product} {default}
     bool Inline                                   = true                                      {product} {default}
     bool InlineArrayCopy                          = true                                   {diagnostic} {default}
     bool InlineClassNatives                       = true                                   {diagnostic} {default}
    ccstr InlineDataFile                           =                                           {product} {default}
     intx InlineFrequencyCount                     = 100                                 {pd diagnostic} {default}
     bool InlineMathNatives                        = true                                   {diagnostic} {default}
     bool InlineNIOCheckIndex                      = true                                {C1 diagnostic} {default}
     bool InlineNatives                            = true                                   {diagnostic} {default}
     bool InlineObjectCopy                         = true                                {C2 diagnostic} {default}
     bool InlineObjectHash                         = true                                   {diagnostic} {default}
     bool InlineReflectionGetCallerClass           = true                                {C2 diagnostic} {default}
     intx InlineSmallCode                          = 2000                                   {pd product} {default}
     bool InlineSynchronizedMethods                = true                                   {C1 product} {default}
     bool InlineThreadNatives                      = true                                   {diagnostic} {default}
     bool InlineUnsafeOps                          = true                                   {diagnostic} {default}
     intx MaxInlineLevel                           = 9                                         {product} {default}
     intx MaxInlineSize                            = 35                                        {product} {default}
     intx MaxRecursiveInlineLevel                  = 1                                         {product} {default}
     intx Tier23InlineeNotifyFreqLog               = 20                                        {product} {default}
     bool UseInlineCaches                          = true                                      {product} {default}
     bool UseInlineDepthForSpeculativeTypes        = true                                {C2 diagnostic} {default}
     bool UseOnlyInlinedBimorphic                  = true                                   {C2 product} {default
Guillaume Martres
@smarter
no, I think that's overkill
Diego E. Alonso Blas
@diesalbla
Such as FreqInlineSize, MaxInlineSize and MaxRecursiveInlineLevel
Shane Delmore
@ShaneDelmore
Anecdotal, but when I ran with graal enabled I got 6% compilation improvement on Twitter’s codebase over not enabling it, all other options/jdk version unchanged.
@Jasper-M The 2.12.9 changes broke java interop with code written against 2.12.8. I had not realized at the time the 2.12.8 signature was the one that was incorrect.
Jasper Moeys
@Jasper-M
ok makes sense
som-snytt
@som-snytt
Looks like Scala 3 could use the if it wanted: Ohio State University has lost its fight to trademark the word "The."
Eric K Richardson
@ekrich
Is there an option to add to Scala 2 to tighten up Auto-Application so the migration to Dotty will be easier?
som-snytt
@som-snytt
@ekrich -Xsource:2.14
scala> (new Runnable() { def run() = () }).run
                                           ^
       warning: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method run,
       or remove the empty argument list from its definition (Java-defined methods are exempt).
       In Scala 3, an unapplied method like this will be eta-expanded into a function.
Eric K Richardson
@ekrich
@som-snytt for 2.11 - 2.13 or just 2.13?
som-snytt
@som-snytt
I think there is an open issue about whether to warn when Java-defined API is implicated. Methods on Any, toString, hashCode, are intended not to warn.
Eric K Richardson
@ekrich
It doesn't warn in Dotty from what I've seen.
som-snytt
@som-snytt
I would guess the warning was added in 2.13.
Eric K Richardson
@ekrich
Ok, what I was thinking. Any thing that is being dropped and would warn or error would be great to have with a flag and a guide. Migration may not be easy but so far code that works in Dotty works in the older versions. I have a bunch of test failures so I may revise that statement.
I guess embedded in a smart sbt plugin like sbt-tpolecat would be great.
som-snytt
@som-snytt
It would be nice to have @inoneline, which would behave like @inline and also emit a syntax error if the definition is not expressed as a one-liner in the source text. I speculate that this will be the default behavior under Dotty's one-liner syntax mode.
som-snytt
@som-snytt
In case anyone is considering a Friday release, it's already Friday the 13th UTC (which explains certain phenomena at work today).
Seth Tisue
@SethTisue
no Friday 2.13.1 release, hopefully Monday? "The PR queue is empty and the ticket milestones have been closed. The current release candidate is 2.13.1-bin-a3791d4" (says Stefan on contributors Discourse)
Sébastien Doeraene
@sjrd
Monday is a bank holiday here in Lausanne. If you publish 2.13.1 on Monday, don't expect me to be able to publish Scala.js until late CEST evening.
Seth Tisue
@SethTisue
@sjrd okay, I passed that on to the team, thanks for the heads-up
Rory Graves
@rorygraves
Hi all, Is there a way to tell directly extended classes vs transitively extended classes in the Symbol.ancesters
i.e. I have class Foo extends Bar with Runnable and class Bar extends Baz ancesters gives me Bar, Runnable, Baz, Any but I want the list Bar, Runnable
Li Haoyi
@lihaoyi-databricks
Given a Type in a macro e.g. Foo where class Foo extends Bar[Int, String]; class Bar[T, V], is there a convenient way to get the Int and String out of the Type Foo?
Li Haoyi
@lihaoyi-databricks
(I suspect this is the (n>5)th time I've asked this question, so apologies if it's the same person answering)
Georgi Krastev
@joroKr21
@lihaoyi-databricks asSeenFrom I think
or baseType, check both
Harrison Houghton
@hrhino
@rorygraves should just be sym.info.parents
Although those are Types not Symbols
@lihaoyi-databricks as @joroKr21 says you can do sym.baseType(symbolOf[Bar]).typeArgs
Rory Graves
@rorygraves
Thanks @hrhino
som-snytt
@som-snytt
For a while, I've wanted to learn a new programming language, with new concepts and strange syntax where nothing works the way you'd expect. So this week I decided to learn something about dotty. I was all set to start upgrading my toy projects to Scala 3 when I realized that we can have multiline infix syntax too. (scala/scala#8419)
Li Haoyi
@lihaoyi
Is there any reason why Scala pattern matching on String doesn't generate a lookupswitch on the string hashcode? Java switch statements on strings does so, and it can make a big difference on large matches
Seth Tisue
@SethTisue
@som-snytt having failed to expire of vicarious romantic agony (or tuberculosis) at my first “La Boheme”, at the L.A. Opera, I live on. (to answer your question, unless I only dreamt it?)
@lihaoyi I don't recall it ever being suggested or PRed. sounds like a great contribution opportunity for somebody. if there isn't a scala/bug ticket on it already, I suggest you open one
Shane Delmore
@ShaneDelmore
@som-snytt I merged 2.12.10 in on Full Moon Friday the 13th. My hope is that the full moon and the Friday the 13th cancel each other out.
Seth Tisue
@SethTisue
@ShaneDelmore 🎉
som-snytt
@som-snytt
@ShaneDelmore :+1: in fact it's mid-Autumn festival. My spouse went home to spend time with her mom, but left moon cakes for us. The daughter was catching up on episodes of The 100 when I noticed the moonrise out the patio door and remembered what day it was. I felt like Scrooge realizing it was still Christmas morning. I'm quite the heathen. MTT & the SF symphony started Mahler's 6th about twenty minutes ago, it's a long slog into the city and the daughter has Chinese class, but to me it's the holiest of occasions, yet here I sit in purgatory.