Scala-Java side by side performance comparison