Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 12 Feb 2012
Offline Last Active Feb 16 2012 05:15 AM

Posts I've Made

In Topic: Atomically Update Vector3D In Win32

13 February 2012 - 10:10 AM

Interesting. I had assumed that the threading overhead would be low enough that splitting the update integration and the collision systems to different cores would make sense. I'm still interested in learning about lock-free and data orientated approaches though (so that I know what to look for if/when I get an F1 car). Are there any open source projects that you know of demonstrating these ideas?

In Topic: Atomically Update Vector3D In Win32

13 February 2012 - 09:07 AM

Thanks Antheus.

Atomicity, especially on multi-core depends on cache lines. The problem you should be worried about is false sharing. When two cores work on values sharing the same line, each write causes a cache sync, stalling both of them.

I see! That also may explain why my experiments haven't shown anything close to the performance increase I was hoping for (from profiling I know that the physics systems are the bottleneck). I only recently started reading about processor architectures and caching issues, so I'm still pretty new at this. I'll work what you've said into my current experiment and post some code later.

In Topic: Atomically Update Vector3D In Win32

13 February 2012 - 07:06 AM

Thanks Evil Steve. I'd thought of that before, but my original approach still had a race condition (I was using one array of data and 2 arrays of pointers - one of active but read only data and the other write only but mutable). But I may be able to overcome it using tagged pointers. I'll try it out and post some code shortly.