78

Spent 2 days carefully crafting a highly optimised routine, then spent 3 minutes to write an unoptimised version for benchmarking. The latter ran 50% faster.

Comments
  • 8
    premature optimization !
  • 0
    I created an algorithm to compare to dijkstra, which id O(n^2)... Mine was O(n^n) and ran just as fast... Still don't know why
  • 2
    @Folkmann, the big O notation measures complexity and not absolute performance. Give it an N that is large enough and the parity starts to show.
  • 0
    @benhongh I know, but it's ment to estimate performance, so it still doesn't make sense that they are about equal in speed.
Add Comment