Skip to main content

Lund University Publications

LUND UNIVERSITY LIBRARIES

Classification-based Static Collection Selection for Java: Effectiveness and Adaptability

Couderc, Noric LU orcid ; Reichenbach, Christoph LU orcid and Söderberg, Emma LU orcid (2023) p.111-120
Abstract
Carefully selecting the right collection datastructure can significantly improve the performance of a Java program. Unfortunately, the performance impact of a certain collection selection can be hard to estimate.To assist developers there are tools that recommend collections to use based on static and/or dynamic information about a program. The majority of existing collection selection tools for Java (e.g., CoCo, CollectionSwitch) pick their selections dynamically, which means that they must trade off sophistication in their selection algorithm against its run time overhead.For static collection selection, the Brainy tool has demonstrated that complex, machine-dependent models can produce substantial performance improvements, albeit only... (More)
Carefully selecting the right collection datastructure can significantly improve the performance of a Java program. Unfortunately, the performance impact of a certain collection selection can be hard to estimate.To assist developers there are tools that recommend collections to use based on static and/or dynamic information about a program. The majority of existing collection selection tools for Java (e.g., CoCo, CollectionSwitch) pick their selections dynamically, which means that they must trade off sophistication in their selection algorithm against its run time overhead.For static collection selection, the Brainy tool has demonstrated that complex, machine-dependent models can produce substantial performance improvements, albeit only for C++ so far.

In this paper, we port Brainy from C++ to Java, and evaluate its effectiveness for 5 benchmarks from the DaCapo benchmark suite. We compare it against the original program, but also to a variant of a brute-force approach to collection selection, which serves as our ground truth for optimal performance. Our results show that in four benchmarks out of five, our ground truth and the original program are similar. In one case, the ground truth shows an optimization yielding 15% speedup was available, but our port did not find this substantial optimization. We find that the port is more efficient but less effective than the ground truth, can easily adapt to new hardware architectures, and incorporate new datastructures with at most a few hours of human effort. We detail challenges that we encountered porting the Brainy approach to Java, and list a number of insights and directions for future research. (Less)
Please use this url to cite or link to this publication:
author
; and
organization
publishing date
type
Chapter in Book/Report/Conference proceeding
publication status
published
subject
host publication
EASE '23: Proceedings of the 27th International Conference on Evaluation and Assessment in Software Engineering
pages
111 - 120
publisher
Association for Computing Machinery (ACM)
external identifiers
  • scopus:85162194442
ISBN
9798400700446
DOI
10.1145/3593434.3593469
language
English
LU publication?
yes
id
45acde4d-726f-467d-bc2a-c51d8474f527
date added to LUP
2023-06-27 17:49:43
date last changed
2023-11-22 22:30:59
@inproceedings{45acde4d-726f-467d-bc2a-c51d8474f527,
  abstract     = {{Carefully selecting the right collection datastructure can significantly improve the performance of a Java program. Unfortunately, the performance impact of a certain collection selection can be hard to estimate.To assist developers there are tools that recommend collections to use based on static and/or dynamic information about a program. The majority of existing collection selection tools for Java (e.g., CoCo, CollectionSwitch) pick their selections dynamically, which means that they must trade off sophistication in their selection algorithm against its run time overhead.For static collection selection, the Brainy tool has demonstrated that complex, machine-dependent models can produce substantial performance improvements, albeit only for C++ so far.<br/><br/>In this paper, we port Brainy from C++ to Java, and evaluate its effectiveness for 5 benchmarks from the DaCapo benchmark suite. We compare it against the original program, but also to a variant of a brute-force approach to collection selection, which serves as our ground truth for optimal performance. Our results show that in four benchmarks out of five, our ground truth and the original program are similar. In one case, the ground truth shows an optimization yielding 15% speedup was available, but our port did not find this substantial optimization. We find that the port is more efficient but less effective than the ground truth, can easily adapt to new hardware architectures, and incorporate new datastructures with at most a few hours of human effort. We detail challenges that we encountered porting the Brainy approach to Java, and list a number of insights and directions for future research.}},
  author       = {{Couderc, Noric and Reichenbach, Christoph and Söderberg, Emma}},
  booktitle    = {{EASE '23: Proceedings of the 27th International Conference on Evaluation and Assessment in Software Engineering}},
  isbn         = {{9798400700446}},
  language     = {{eng}},
  pages        = {{111--120}},
  publisher    = {{Association for Computing Machinery (ACM)}},
  title        = {{Classification-based Static Collection Selection for Java: Effectiveness and Adaptability}},
  url          = {{http://dx.doi.org/10.1145/3593434.3593469}},
  doi          = {{10.1145/3593434.3593469}},
  year         = {{2023}},
}