Hash-based maps, particularly java.util.HashMap, are pervasive in Java applications and the JVM, making their performance critical. Evaluating optimizations is challenging because performance depends on factors such as operation patterns, key distributions, and resizing behavior. Microbenchmarks are fast and repeatable but often oversimplify workloads, failing to capture the realistic usage patterns. Application benchmarks (e.g., DaCapo, Renaissance) provide realistic usages but are more expensive to run, prone to variability, and dominated by non-HashMap computations, making map-related performance changes difficult to observe. To address this challenge, we propose MapReplay, a benchmarking methodology that combines the realism of application benchmarks with the efficiency of microbenchmarks. MapReplay traces HashMap API usages generating a replay workload that reproduces the same operation sequence while faithfully reconstructing internal map states. This enables realistic and efficient evaluation of alternative implementations under realistic usage patterns. Applying MapReplay to DaCapo-Chopin and Renaissance, the resulting suite, MapReplayBench, reproduces application-level performance trends while reducing experimentation time and revealing insights difficult to obtain from full benchmarks.


翻译:基于哈希的映射结构(尤其是java.util.HashMap)在Java应用程序及JVM中普遍存在,其性能至关重要。评估优化方案具有挑战性,因为性能取决于操作模式、键值分布与扩容行为等多种因素。微基准测试虽快速且可重复,但往往过度简化工作负载,无法捕捉真实使用模式。应用级基准测试(如DaCapo、Renaissance)能提供真实使用场景,但运行成本更高、易受波动影响,且主要受非HashMap计算主导,导致映射结构相关的性能变化难以观测。为应对这一挑战,我们提出MapReplay基准测试方法,该方法融合了应用级基准测试的真实性与微基准测试的高效性。MapReplay通过追踪HashMap API使用情况生成可重放工作负载,在精确重建内部映射状态的同时复现相同的操作序列。这使得在真实使用模式下对替代实现方案进行既真实又高效的评估成为可能。将MapReplay应用于DaCapo-Chopin与Renaissance后,所得测试套件MapReplayBench在复现应用级性能趋势的同时,显著减少了实验耗时,并揭示了从完整基准测试中难以获取的性能洞见。

0
下载
关闭预览

相关内容

【Facebook】人工智能基准(Benchmarking)测试再思考,55页ppt
专知会员服务
31+阅读 · 2020年12月20日
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
爱奇艺基于AI的移动端自动化测试框架的设计
前端之巅
18+阅读 · 2019年2月27日
一文读懂目标检测:R-CNN、Fast R-CNN、Faster R-CNN、YOLO、SSD
七月在线实验室
11+阅读 · 2018年7月18日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
全解:目标检测,图像分类、分割、生成……
全球人工智能
20+阅读 · 2017年9月15日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
美陆军设想无人系统司令部
专知会员服务
0+阅读 · 今天13:45
【博士论文】已对齐人工智能系统的持久脆弱性
专知会员服务
0+阅读 · 今天13:52
扭曲还是编造?视频大语言模型幻觉研究综述
专知会员服务
0+阅读 · 今天13:41
《采用系统思维应对混合战争》125页
专知会员服务
2+阅读 · 今天12:47
战争机器学习:数据生态系统构建(155页)
专知会员服务
6+阅读 · 今天8:10
内省扩散语言模型
专知会员服务
5+阅读 · 4月14日
国外反无人机系统与技术动态
专知会员服务
3+阅读 · 4月14日
相关VIP内容
【Facebook】人工智能基准(Benchmarking)测试再思考,55页ppt
专知会员服务
31+阅读 · 2020年12月20日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员