[OT] This feels wrong (pthreads question)

Levi Pearson levi at cold.org
Mon Jan 29 13:53:48 MST 2007


Steve <smorrey at gmail.com> writes:

> Almost forgot to mention that I'm  using an array of 3 "long long"s
> to represent x,y,z.
>
> My multimap based SceneGraph is indexed by the entities position.x
> Is there anything I need to be concerned with performance wise here?
>
> Thanks in advance!

Did you miss the performance concern I mentioned just a little
earlier?  A large cluster of objects with similar X coordinates and
widely dispersed Y and/or Z coordinates will return a bunch of
extraneous objects that you'll have to check Y and Z coordinates for.

You really ought to consider R-trees, as there has been extensive
reasearch on them and they are widely used in practice for just the
kind of thing you're doing.

                --Levi



More information about the PLUG mailing list