Using OpenMP Improves Irrlicht Performance by 4x!

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
xezero
Posts: 1
Joined: Wed May 06, 2009 8:47 pm

Using OpenMP Improves Irrlicht Performance by 4x!

Post 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....
Jookia
Posts: 170
Joined: Wed Nov 19, 2008 1:11 am

Post by Jookia »

I hear yah, bro.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

This sounds very interesting. I'd be interested in the patch!
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Patche please :D
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Also interested in seeing a patch and checking performance gain myself.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post 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?
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post 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.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Post Reply