English

An Empirical Study: MEMS as a Static Performance Metric

Software Engineering 2025-05-13 v1

Abstract

Static performance estimation is essential during compile-time analysis, yet traditional runtime-based methods are costly and platform-dependent. We investigate mems, the number of memory accesses, as a static and architecture-independent performance metric. We develop a Clang-based automated instrumentation tool that rewrites source code to insert path tracing and \textit{mems} counting logic. This allows us to evaluate mems-based performance estimation across ten classical algorithm programs. Experimental results show that within the same program, execution paths with higher mems values consistently exhibit longer runtime. However, this correlation weakens between different programs, suggesting that mems is best suited for comparing performance of different execution paths in a program.

Keywords

Cite

@article{arxiv.2505.07208,
  title  = {An Empirical Study: MEMS as a Static Performance Metric},
  author = {Liwei Zhang and Baoquan Cui and Xutong Ma and Jian Zhang},
  journal= {arXiv preprint arXiv:2505.07208},
  year   = {2025}
}
R2 v1 2026-06-28T23:29:01.500Z