Measuring time in Java

前端 未结 4 1164
粉色の甜心
粉色の甜心 2021-01-03 01:17

So I was trying to measure the time two different algorithm implementations took to accomplish a given task, and here is the result:

i    alg1  alg2
4   0.00         


        
4条回答
  •  一整个雨季
    2021-01-03 01:50

    System.nanoTime(); perhaps, is what you're looking for. And add calculations for standard deviation and average time.

提交回复
热议问题