scalac_perf icon indicating copy to clipboard operation
scalac_perf copied to clipboard

The Scala programming language

Results 55 scalac_perf issues
Sort by recently updated
recently updated
newest added

``` /Users/jz/.jabba/jdk/[email protected]/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59491,suspend=y,server=n -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/Users/jz/Library/Caches/JetBrains/IntelliJIdea2020.1/captureAgent/debugger-agent.jar -agentpath:/private/var/folders/22/g1sv634d11j1d_lqlnhz9p2r0000gn/T/libmemory_agent701.dylib= -Dfile.encoding=UTF-8 -classpath "/Users/jz/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/201.4865.12/IntelliJ IDEA 2020.1 EAP.app/Contents/lib/idea_rt.jar:/Users/jz/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/201.4865.12/IntelliJ IDEA 2020.1 EAP.app/Contents/plugins/junit/lib/junit5-rt.jar:/Users/jz/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/201.4865.12/IntelliJ IDEA 2020.1 EAP.app/Contents/plugins/junit/lib/junit-rt.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/charsets.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/cldrdata.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/dnsns.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/jaccess.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/localedata.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/nashorn.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/sunec.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/ext/zipfs.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/jce.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/jsse.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/management-agent.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/resources.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/jre/lib/rt.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/lib/dt.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/lib/jconsole.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/lib/sa-jdi.jar:/Users/jz/.jabba/jdk/[email protected]/Contents/Home/lib/tools.jar:/Users/jz/code/scala/target/junit/test-classes:/Users/jz/code/scala/build/quick/classes/library:/Users/jz/code/scala/build/quick/classes/reflect:/Users/jz/code/scala/build/quick/classes/compiler:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/jline/jline/2.14.6/jline-2.14.6.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.12/jansi-1.12.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-asm/7.3.1-scala-1/scala-asm-7.3.1-scala-1.jar:/Users/jz/code/scala/build/quick/classes/repl:/Users/jz/code/scala/build/quick/classes/interactive:/Users/jz/code/scala/build/quick/classes/scaladoc:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/webjars/jquery/3.4.1/jquery-3.4.1.jar:/Users/jz/code/scala/build/quick/classes/partest-extras:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-partest_2.12/1.1.9/scala-partest_2.12-1.1.9.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/openjdk/jol/jol-core/0.9/jol-core-0.9.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.jar:/Users/jz/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 scala.collection.immutable.HashSetTest,optimizedAppendAllWorks Connected to the target...

Avoid allocating `Some`s; just emit `if (tag.runtimeClass.isInstance(scrutinee)) ...`

Results from perf_tester: Parser phase comparison: ``` 19:30:25 after 0 best 10%, phase parser 19:30:25 Run Name Cycle samples Wall time (ms) All Wall time (ms) CPU(ms) Idle time (ms)...

https://github.com/scala/scala/blob/546a57105e33678d9d0aba9da486006e4715924c/src/compiler/scala/tools/nsc/typechecker/Macros.scala#L848-859 ```scala private def calculateUndetparams(expandee: Tree): scala.collection.mutable.Set[Symbol] = if (forced(expandee)) scala.collection.mutable.Set[Symbol]() else delayed.getOrElse(expandee, { val calculated = scala.collection.mutable.Set[Symbol]() expandee foreach (sub => { def traverse(sym: Symbol) = if (sym !=...

def r0: Regex = new Regex(toString) generates ```` // access flags 0x1 public r0()Lscala/util/matching/Regex; L0 LINENUMBER 12 L0 NEW scala/util/matching/Regex DUP ALOAD 0 INVOKEVIRTUAL scala/collection/immutable/XX.toString ()Ljava/lang/String; GETSTATIC scala/Predef$.MODULE$ : Lscala/Predef$;...

Investigate the high call count ``` 420422 scala.collection.immutable.$colon$colon::hashCode()I ```

investigation
compiler

``` scala> def test(a: Option[Int], b: Int) = (a, b) match { case (Some(x), y) => x + y; case (None, y) => y } [[syntax trees at end of...

def hasFlag(mask: Int): Boolean = hasFlag(mask.toLong) is this faster if we use the final long interface

PRed

started in https://github.com/rorygraves/scalac_perf/tree/mike/2.13.x_TrieMapBuilder

collections
library