1st Scala at Atlassian
A practical Scala panel convened at Scala for Startups and Bay Area Scala Enthusiasts by Alexy Khrabrov and Mike Slinn.
Dick Wall, Bill Venners, Mark McBride, and Vlad Patryshev talk about the practical use of Scala. The original Google doc shown lists the points:
https://www.meetup.com/scala-for-startups/events/49518642/
Have you read the leaked private Yammer email about their issues with Scala? Are you familiar enough with the subjects raised to be able to discuss them intelligently? Some of these topics are advanced, others run deep. This panel discussion will focus on the major topics that were raised.
Each topic will kick off with a 10 to 15 minute tutorial, followed by a panel discussion for 15-20 minutes. We intend to address 3 or 4 topics in the Scala for Startups meetup, and another 3-4 topics in the BASE meetup a few days later. Topics are here (https://docs.google.com/document/d/1DsU7nbdRdddkzQgO-uvq4d7EffAasI5On6H3oJWfh8w/edit).
So far our panelists (in order of acceptance) include Bill Venners, Dick Wall and Mark McBride. We would like a few more, so if you feel comfortable about holding forth in public about them, please let Mike Slinn or Alexy Krabrov know.
Alexy and Mike will moderate the Scala for Startups panel discussion. Mike will moderate the BASE discussion.
- For-loop overhead
Loop closure - Invoke virtual calls
- How to write the same code as a while-loop or tail recursive call
- Closure overhead
- Lambdas are not free?
Lambdas are syntactic sugar on top of anonymous classes? - ScalaCL compiler plugin
copying things to and from arrays instead of using immutable collections. - scala.collection.mutable overhead
Replace scala.collection.mutable.HashMap with java.util.HashMap yields an order-of-magnitude performance benefit?
Any of methods which took a Builder or CanBuildFrom would immediately produce a mutable.HashMap
Solution: explicit external iterators and a while-loop? - scala.collection.immutable overhead
Replace scala.collection.immutable.HashMap with java.util.concurrent.ConcurrentHashMap yields a large performance benefit for a read-only workload? - Replace small Sets with lookup arrays?
- private[this]
Avoids turning simple field access into an invokevirtual on generated getters and setters.
Generally HotSpot would end up inlining these, but inside our inner serialization loop this made a huge difference. - Replacing Specs2 for a JUnit wrapper meant that the main test class for one of our projects (~600-700 lines) no longer took three minutes to compile or produced 6MB of .class files. It did this by not capturing everything as closures.
- Examples of Scala idioms, discussion
- How to manage Ivy dependencies, and discussion
- Scala/Maven instead of sbt