in reply to Show that using references is faster
I ran into the reverse problem: I needed the sort() to dominate the benchmark. As I show in Wasting time thinking about wasted time, you actually have to do a bit of work to make a proper benchmark so you blame the right bits for the slow-downs.
In this case, you should have had a control that measured all the bits except the argument passing so you would know how much of the time is spent on the common code.
When you see results that you don't expect, look for the flaw in the experiment first. :)
|
|---|