diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-05-20 22:16:03 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-05-20 22:16:03 -0600 |
commit | 6592197ee64e1a1d4f1c7db3573895ddce617571 (patch) | |
tree | 75a3f0a40ae9d48dfe499f001171fa0a31cc89dc /libdimension/prtree.h | |
parent | d1e94994f75466ab207322f59847ac0f359f46b8 (diff) | |
download | dimension-6592197ee64e1a1d4f1c7db3573895ddce617571.tar.xz |
Store the bounding boxes of child PR-tree nodes in the parent.
This improves cache locality and is good for about a 10% performance boost.
Diffstat (limited to 'libdimension/prtree.h')
-rw-r--r-- | libdimension/prtree.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libdimension/prtree.h b/libdimension/prtree.h index 1f2dd29..eab359d 100644 --- a/libdimension/prtree.h +++ b/libdimension/prtree.h @@ -34,12 +34,12 @@ #define DMNSN_PRTREE_B 6 typedef struct dmnsn_prtree_node { + dmnsn_bounding_box bounding_box; + /* Children (objects or subtrees) */ - void *children[DMNSN_PRTREE_B]; bool is_leaf; - - /* Bounding box */ - dmnsn_bounding_box bounding_box; + void *children[DMNSN_PRTREE_B]; + dmnsn_bounding_box bounding_boxes[DMNSN_PRTREE_B]; } dmnsn_prtree_node; typedef struct dmnsn_prtree { |