HackerPapers

arXiv:1406.6631cs.PL

Clash of the Lambdas

Aggelos Biboudis, Nick Palladinos, Yannis Smaragdakis

Abstract

The introduction of lambdas in Java 8 completes the slate of statically-typed, mainstream languages with both object-oriented and functional features. The main motivation for lambdas in Java has been to facilitate stream-based declarative APIs, and, therefore, easier parallelism. In this paper, we evaluate the performance impact of lambda abstraction employed in stream processing, for a variety of high-level languages that run on a virtual machine (C#, F#, Java and Scala) and runtime platforms (JVM on Linux and Windows, .NET CLR for Windows, Mono for Linux). Furthermore, we evaluate the performance gain that two optimizing libraries (ScalaBlitz and LinqOptimizer) can offer for C#, F# and Scala. Our study is based on small-scale throughput-benchmarking, with significant care to isolate different factors, consult experts on the systems involved, and identify causes and opportunities. We find that Java exhibits high implementation maturity, which is a dominant factor in benchmarks. At the same time, optimizing frameworks can be highly effective for common query patterns.

arXiv comments
In the revised version: 1) we used a fixed heap with 3GB. The GC throughput was improved and results are more balanced, 2) we discussed briefly why we chose not to use targeted JVM flags, 3) we discussed @specialized and miniboxing, 4) we added a new benchmark that tests a streaming operation that avoids automatic boxing of our input data and 5) a subtitle was added
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jan 2015 to Nov 2016.

Comments linking this paper, per year.

Discussed in comments2 threads

    • The design and implementation of this library was led by my co-author Nick Palladinos and it ports the design of Java 8 streams to CLR. Check the structure of this library following the definitions of Run in line 41 [1] upwards. You will notice that the code is in continuation…

      abiboudisView on HNParent context

  1. Java 8: No more loops 1 comment
    • Have they improved the implementation recently? I have not benchmarked myself, but according to [1], they are slower than the equivalent loop-based code. [1] http://arxiv.org/pdf/1406.6631v2.pdf

      azthView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.