Why Scala
Scala runs on the JVM but brings a functional programming paradigm — pattern matching, immutable collections, higher-order functions. Comparing it against Java and Kotlin on the same JVM would show the overhead (or lack thereof) of functional idioms in a shared runtime.
Key considerations
- JVM-based — can compare directly with Java and Kotlin
- Scala 3 is the current version, significant changes from Scala 2
- Functional style may require different patterns for treap/mutable data structures
scala-cli simplifies single-file compilation/execution
- Scala Native exists but is less mature — JVM target is the priority
Implementation
Implement all 7 benchmark algorithms following the reference implementations (PHP, C++, Python):
Setup:
Why Scala
Scala runs on the JVM but brings a functional programming paradigm — pattern matching, immutable collections, higher-order functions. Comparing it against Java and Kotlin on the same JVM would show the overhead (or lack thereof) of functional idioms in a shared runtime.
Key considerations
scala-clisimplifies single-file compilation/executionImplementation
Implement all 7 benchmark algorithms following the reference implementations (PHP, C++, Python):
Setup:
langs/scala/benchmark.ymldocker/scala/Dockerfile