Eliminating abstraction overhead of Java stream pipelines using ahead-of-time program optimization
Anders Møller, Oskar Haarklou Veileborg
摘要
Java 8 introduced streams that allow developers to work with collections of data using functional-style operations. Streams are often used in pipelines of operations for processing the data elements, which leads to concise and elegant program code. However, the declarative data processing style comes at a cost. Compared to processing the data with traditional imperative language mechanisms, constructing stream pipelines requires extra heap objects and virtual method calls, which often results in significant run-time overheads. In this work we investigate how to mitigate these overheads to enable processing data in the declarative style without sacrificing performance. We argue that ahead-of-time bytecode-to-bytecode transformation is a suitable approach to optimization of stream pipelines, and we present a static analysis that is designed to guide such transformations. Experimental results show a significant performance gain, and that the technique works for realistic stream pipelines. For 10 of 11 micro-benchmarks, the optimizer is able to produce bytecode that is as effective as hand-written imperative-style code. Additionally, 77% of 6879 stream pipelines found in real-world Java programs are optimized successfully.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
引用它的顶会 Paper4
- Fail Faster: Staging and Fast Randomness for High-Performance PBTCynthia Richey, Joseph W. Cutler, Harrison Goldstein, Benjamin C. PierceOOPSLA 2026 · 被引用 1 次
- JEDI: Java Evaluation of Declarative and Imperative Queries: Benchmarking the Java Stream APIFilippo Schiavio, Walter BinderICSE 2026
- Two Approaches to Fast Bytecode Frontend for Static AnalysisChenxi Li, Haoran Lin, Tian Tan, Yue LiOOPSLA 2025
- Heap Abstraction via Early-Confluent Object Merging for Pointer AnalysisJinpeng Wang, Yufei Liang, Zhongsheng Zhan, Tian Tan 等OOPSLA 2026
相关 Paper
- Imperative versus Declarative Collection Processing: An RCT on the Understandability of Traditional Loops versus the Stream API in JavaNils Mehlhorn, Stefan HanenbergICSE 2022 · 被引用 4 次
- Why Do Developers Remove Lambda Expressions in Java?Mingwei Zheng, Jun Yang, Ming Wen, Hengcheng Zhu 等ASE 2021 · 被引用 9 次
- Does the Stream API Benefit from Special Debugging Facilities? A Controlled Experiment on Loops and Streams with Specific DebuggersJan Reichl, Stefan Hanenberg, Volker GruhnICSE 2023 · 被引用 1 次
- StreamQL: a query language for processing streaming time seriesLingkun Kong, Konstantinos MamourasOOPSLA 2020 · 被引用 8 次
- JOSer: Just-In-Time Object Serialization for Heavy Java Serialization WorkloadsChaokun Yang, Pengbo Nie, Ziyi Lin, Weipeng Wang 等ASPLOS 2026
