问题:
How do you write (and run) a correct micro-benchmark in Java? 您如何用Java编写(并运行)正确的微基准测试?
I'm looking for some code samples and comments illustrating various things to think about. 我正在寻找一些代码示例和注释,以说明要考虑的各种问题。
Example: Should the benchmark measure time/iteration or iterations/time, and why? 示例:基准测试应测量时间/迭代或迭代/时间,为什么?
Related: Is stopwatch benchmarking acceptable? 相关: 秒表基准测试是否可以接受?
解决方案:
参考一: https://stackoom.com/question/278h/如何在Java中编写正确的微基准测试参考二: https://oldbug.net/q/278h/How-do-I-write-a-correct-micro-benchmark-in-Java
来源:oschina
链接:https://my.oschina.net/u/4438370/blog/3284140