Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

2 implementation of min function and 1 inbuilt min function

benchmark using hyperfine

might use perf for cpp, timeit for py for benchmarking

first generate input data from ip.jl or ip.py and then feed into minbench.cpp or minbench.cpp


todo

FunctionMean [ms]Min [ms]Max [ms]Relative
inbuilt min inp1378.3 ± 4.4372.6399.22.86 ± 0.10
inbuilt min inp2132.1 ± 4.3128.5153.51.00
numpy min inp1625.5 ± 85.8458.7828.13.78 ± 0.52
numpy min inp2165.4 ± 3.3159.4173.81.00
akd min inp1409.3 ± 6.6396.5437.63.07 ± 0.06
akd min inp2133.2 ± 1.2130.9135.31.00
boobi min inp1420.9 ± 5.3411.5443.93.09 ± 0.09
boobi min inp2136.2 ± 3.3133.1147.91.00

conclusion:

  • In DonaldKnuth's paper "StructuredProgrammingWithGoToStatements", he wrote: "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
  • https://en.wikipedia.org/wiki/Program_optimization

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages