Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject:
PostPosted: Wed May 09, 2007 12:44 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 759
Location: Bellevue, WA
I am looking through the Bullet code and try to understand some of the ideas:

Q1: What is actually the motivation for the quantization? What do you win by this? Why do you speak of expanding/shrinking in this context?

Q2: What is the advantage of using continuous arrays instead of a likend list. Again you have to swap (copy) quite a lot of memory when inserting/updating the edge list.

Q3: Is the quantization related to the implementation as array or are these two independent optimizations?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 09, 2007 6:04 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3746
Location: California, USA
Dirk Gregorius wrote:
I am looking through the Bullet code and try to understand some of the ideas:

Q1: What is actually the motivation for the quantization? What do you win by this? Why do you speak of expanding/shrinking in this context?

Reduce memory cost (and improve performance), and perform integer comparison instead of floating point.
Dirk Gregorius wrote:
Q2: What is the advantage of using continuous arrays instead of a likend list. Again you have to swap (copy) quite a lot of memory when inserting/updating the edge list.

Arrays are almost always better then linked list nowadays. Traversing linked-lists trashes the cache. Those 3 array are pre-allocated once, and the swapping of endpoint is hence very cache friendly (likely to be in L1 or L2 cache). In case of streaming worlds, with large amount of added new objects the strategy still works, but needs some refinement (I'll discuss this after it is implemented in Bullet).
Dirk Gregorius wrote:
Q3: Is the quantization related to the implementation as array or are these two independent optimizations?

Independent. However, note that the overlap check is optimized because of array properties: array indices are compared, instead of the actual min/max values.

Hope this helps,
Erwin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Eaglegor and 4 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:  
Powered by phpBB® Forum Software © phpBB Group