• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java 8 vs Scala performance

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you have a chance to benchmark Java 8 FP and/or Scala performance...

if there is , apart from Tail recursion call , what other elements in Java 8 contribute to performance difference with Scala

Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have not conducted very precise benchmarks. There is however one main reason for Scala programs to be faster than the programs you will be able to write with the elements developed in the book: optimization. Most Scala structures are implemented in imperative style when maximum performance is needed, using mutable variables internally. On contrary, most structures presented in the book are implemented in functional style, for pedagogical reasons. If we were designing a functional library, we would probably be tempted to do the same as Scala. However, most of the functional structures that I present have been used in production for several years (starting with a Java 6 version!) giving good enough performance.
    Bookmark Topic Watch Topic
  • New Topic