Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 00:42

All times are UTC + 1 hour




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: 02.12.2008, 23:18 
Offline

Joined: 02.12.2008, 21:25
Posts: 8
I have noticed the the bottleneck that is updateQueuesRec() also and after some investigating, determined the cause of the bottleneck to be cache misses, not cpu instructions. Therefore, adding threads will not yield the 1.5X performance improvements you are hoping for. Furthermore adding threads for scenes with large scene graph will yield even lower gains if your CPU has shared cache (even the trusted core2 has shared L2 cache) as cache misses from one thread may pollute the cache of the other thread (ie. the predictive prefetching of one thread my be flushed due to a cache miss of another thread). Compound this with the overhead of synchronization access to shared data and you now have to be very careful in when and how you use threads in order to actually get some benefits. As for which thread library to use, I would recommend looking into OpenMP as a better way of optimizing this function since it is platform independent and wouldn't require additional source files (only a few tags here and there). Hope this helps ;-)


Top
 Profile  
Reply with quote  
PostPosted: 03.12.2008, 16:57 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
The current state of the discussion was that threads won't bring enough of an advantage to justify the added complexity and game engines also use threads in a more efficient way then we can. So my conclusion was to stop this experiment with the result that threads are not needed by Horde3D.

If you want to take the code and implement it using OpenMP or whatever else technology you are welcome to present your solution with some statistics about its performance. You could even optimize the data structures so that there are not that many cache misses as you described in your other post.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group