Q: Compiler impact on speed?

   5141   6   2
User Avatar
Member
7025 posts
Joined: July 2005
Offline
So, I use Suse 10.2 which uses gcc 4.1 but up until today I was downloading and installing 9.1 compiled for gcc 3.4. I don't remember why

Today I downloaded and installed 9.1.120 for gcc 4.1 and then on a whim rendered the exact same .ifd with 9.1.117 (gcc 3.4 version) and 9.1.120 (gcc 4.1 version).

The gcc 3.4 version was 1:47, the gcc 4.1 render was 1:27!

Does that make sense? I'd assume a newer compiler did better optimization but that's a pretty big difference.

cheers,

Peter B
User Avatar
Member
52 posts
Joined: July 2005
Offline
Could this recent change be having an effect?

Wednesday, January 9, 2008
Houdini 9.1.118: A minor change was made to the VEX optimizer. In theory, this should have minimal effect on existing shaders (other than to make some of them run faster). If there are unexpected side effects, the optimization can be turned off by setting the environment variable HOUDINI_DISABLE_UNSAFE_VEX.
User Avatar
Member
7025 posts
Joined: July 2005
Offline
Hmm, quite possibly, though that's a nice speed increase if that's the case!!

Cheers,

Peter B
User Avatar
Member
483 posts
Joined: July 2005
Offline
I would be entirely unsurprised if gcc 4.1 could outperform gcc 3.4 by that much. It's a vastly different compiler internally, and it does a bunch of SSE/MMX stuff automatically too.

However, as Moose mentions, you're not exactly comparing apples to apples here.
User Avatar
Member
52 posts
Joined: July 2005
Offline
Joe
…and it does a bunch of SSE/MMX stuff automatically too.
Just to sidetrack this thread momentarily ops:: Not knowing much about programming, do any of the new SSE4 instructions on Intel's new chips lend themselves to Houdini / Mantra, and if so, are any of them already in use (or plan to be soon)?

I read that divx, which has been optimised for SSE4, got something like a 45% boost over SSE2. Not saying divx and Houdini / Mantra are doing the same thing programmatically, but it is intriguing to fantasise about the potential Houdini could also benefit by - even if it's by not quite as much as that.
User Avatar
Member
1002 posts
Joined: July 2005
Offline
When I upgraded to gcc 4.1 from 3.4, I routinely noticed speedups around 10%, so your 20s speedup (about 20%) seems somewhat reasonable. 64-bit builds also usually show a 5-10% speedup over their 32-bit counterparts.

In terms of SSE support, there are some portions of mantra/vex that make heavy use of sse (the micropolygon sampling algorithm, for example - used for motion blur and depth of field), though even in the most extreme cases the speedup is not much more than 10%. You can test render times without SSE by enabling the environment variable HOUDINI_DISABLE_MMX=1. Given this result, I don't expect any significant improvement for rendering from the few new instructions added with sse4.

Andrew
User Avatar
Member
52 posts
Joined: July 2005
Offline
Cheers for the explanation Andrew.
  • Quick Links