Benchmarks
by Mithrandir
Recently I discovered the joy of answering questions on Stack Overflow. I had a SO account for two years but I didn’t use it until a few weeks ago. This article started after receiving a little feedback on one of my answers.
As you see, I was trying to give a benchmark for those two cases. Yet, it was reported as being an ugly hack and not a try at comparing two solutions. I post this short article here not because I wanted a place to cry that I was criticized but because I desired some advice on what should a good benchmark contain and how to write a proper one.
Thanks :)
Mithrandir,
I learned the hard way that people don’t like to be taught, especially when it can be shown that their “hack” is useless.
Don’t bother, humanity always favors mediocrity!!
Regards,
Rafael
I like to be taught and I want to know what I did wrong and what was the right way of doing it.
Mithrandir, I am sorry…
I meant the “(a-a%b)/b” hack, which is obviously wrong, not your benchmark! Your benchmark is the right way to go if one needs to check whether an algorithm is better or not.
English is not my first language, so I think I was not very clear in my first comment!
What I meant is that, sometimes when you say something is wrong, and you show why it is wrong (your benchmarks), people tend to look for ways to diminish the result.
As I said, humanity favors mediocrity. They don’t like smart as much as they don’t like dumb people.
Thanks :)