Empirically estimating big-oh time efficiency

前端 未结 10 1946
清酒与你
清酒与你 2020-12-23 16:52

Background

I\'d like to estimate the big-oh performance of some methods in a library through benchmarks. I don\'t need precision -- it suffices to show that someth

10条回答
  •  无人及你
    2020-12-23 17:04

    You should consider changing a critical aspects of your task.

    Change the terminology that you are using to: "estimate the runtime of the algorithm" or "setup performance regression testing"

    Can you estimate the runtime of the algorithm? Well you propose to try different input sizes and measure either some critical operation or the time it takes. Then for the series of input sizes you plan to programmaticly estimate if the algorithm's runtime has no growth, constant growth, exponential growth etc.

    So you have two problems, running the tests, and programmatically estimating the growth rate as you input set grows. This sounds like a reasonable task.

提交回复
热议问题