Is my method of measuring running time flawed?

前端 未结 8 626
春和景丽
春和景丽 2021-02-05 12:14

Sorry, it\'s a long one, but I\'m just explaining my train of thought as I analyze this. Questions at the end.

I have an understanding of what goes into measuring runni

8条回答
  •  离开以前
    2021-02-05 12:20

    I had a similar question here.

    I much prefer the concept of using a single stopwatch, especially if you are micro benchamrking. Your code is not accounting for the GC which can affect performance.

    I think forcing a GC collection is pretty important prior to running test runs, also I am not sure what the point is of a 100 warmup run.

提交回复
热议问题