Performance shock while developing
Saturday, December 26th, 2009Few months ago I improved the performance of Denoise’s algorithm by incorporating a Grand Central technology of Mac OS X 10.6 Snow Leopard. All that in the development version which is coming out soon.
As I already wrote in previous post the improvement is marginal – on dual core Mac denoising images is double as fast as in the current version.
As I’m developing Denoise further this week, I was doing lots of denoising, and noticed that it kinda takes too long. As my test images are pretty small to make testing fast during development, the performance slowdown was not easy to spot, but there was that feeling, you know, that something’s not right.
So I started to test, measure, and compare with the version 1.0.
You can’t image how I felt after I figured out that the new algorithm is only around 5% faster. I tried with various images, and nearly always it was just a little improvement. I didn’t understand it. I stopped believing in myself – in work I’ve done months ago. I thought maybe it’s the Snow Leopard update that slowed down something. I was checking the CPU usage in Activity Monitor application, and could clearly see that old version uses only one CPU’s core, the new one both of them. Why the heck is the improvement in processing time so slow ? What was I smoking in the past when I implemented all this ?
It took me maybe two hours to figure out what’s wrong. I was comparing the release version of version 1.0 with debug version of the new 2.0 version. Debugging versions are half as fast as the release ones. At least in my case.
I was relieved, but I’ll never forget those frightening moments of comparing bulls and cows.