Page 1 of 1

Using OpenMP Improves Irrlicht Performance by 4x!

Posted: Wed May 06, 2009 8:55 pm
by xezero
(Sorry for posting this twice...the original post was in the wrong forum..I guess..)

I am currently using Irrlicht in a commercial product at a company that deals with real-time processing and visualizing it. After reading a lot of these forums about multi-threading, I figured I would share this. OpenMP has been around for ages, and I was easily able to incorporate it into the Irrlicht engine to exploit parallelism in all the tight loops to increase the engine's performance by almost 4 times (I have a quad core) in terms of computational processing.

http://openmp.org/wp/

Of course with OpenCL coming out soon, that'll be another opportunity to make Irrlicht's "Lightning fast realtime 3D engine" become "Instant fast realtime 3D engine"

I can post some SVN patches for the engine code changes I did if anyone's interested....

Posted: Wed May 06, 2009 9:03 pm
by Jookia
I hear yah, bro.

Posted: Thu May 07, 2009 1:43 am
by BlindSide
Open MP is nice but it's not supported on Express Edition MSVC (An alternative is G++ which does support Open MP). I recently tried Intel's TBB and found it very nice, it's worth considering our options here if we do indeed decide to extend certain parts of Irrlicht with multi threading.

I am guessing you did not necessarily alter strictly rendering-related parts but mainly things like collision detection/oct-tree generation, frustum culling, etc?

Posted: Sun May 17, 2009 8:45 pm
by sio2
This sounds very interesting. I'd be interested in the patch!

Posted: Tue May 19, 2009 3:08 am
by Dorth
Patche please :D

Posted: Tue May 19, 2009 3:47 pm
by MasterGod
Also interested in seeing a patch and checking performance gain myself.

Posted: Sun Jun 14, 2009 3:18 am
by Midnight
Now you're talking!

Core 2 duo FTW!

One thing I want to ask about is I notice irrlicht already has natural affinity with both of my cores. Is this thing more for quad core support or is multi threading just better at separating the threads for some sort of utilization advantage?

Posted: Sun Jun 14, 2009 12:12 pm
by Sylence
Midnight wrote:One thing I want to ask about is I notice irrlicht already has natural affinity with both of my cores.
How do you check this?

On my quad core an Irrlicht application uses 25% of the CPU time so one core. However Windows doesn't use one core exclusively for one app until you tell it to. One time the 3rd core uses 50% for irrlicht and the next second it's ide but core number 1 is working and so on.

This is because Windows (and Linux I guess) use all availabe cores. So when a core is idle it's most likely that it will get the next load of work.