Curious perfomance difference

This is a discussion on Curious perfomance difference within the C++ Programming forums, part of the General Programming Boards category; *edit*
Whoops! You can disregard this post. It turns out that I was doing slightly different things with each container, ...

Curious perfomance difference

*edit*
Whoops! You can disregard this post. It turns out that I was doing slightly different things with each container, leading to different optimization opportunities. Below is the fixed code, and, as expected, the disparities between g++ and icc are far more subtle.
*edit*

I've been using a 2-dimensional c-style array wrapper class array2d to do some computation. It's nice and fast. But I've been reading about optimization, and so I decided to try a valarray-based 2-dimensional container class.

In compiling my comparison program with g++ set with -O3, I see that the valarray performs quite better in almost every situation.

In compiling with icc set with -fast (and I'm on an Intel chip), I see that array2d is substantially faster.

Also, the g++-compiled program is faster overall. These results surprise me. I was under the naive impression that Intel would burn it. To what might I attribute the disparities?

I'm running Ubuntu 8.04 on an Intel T2060 @ 1.60 GHz / Core.

*edit*
For anyone who's interested in running the test on their machine, here's the code crammed into one file. Just make sure only one of USE_STD_TIME or USE_UNIX_TIME is defined.

I personally would use #elseif in such case - but in this case I'd put the special case of Unix time first, then only use #else at the end, so that if there wasn't ANY definition, it defaults to using standard C time.

Ah. No -- auto_start is just a read-only indicator. Perhaps an enum would have been more clear. The idea is that the user passes auto_start into the initializer in order to start it automatically, and the user passes nothing in order not to automatically start it.
And thanks for the preprocessor correction. I only put these several files into one very hastily.