A performance comparison of tree data structures for N-body simulation

  • Authors:
  • J. Waltz;G. L. Page;S. D. Milder;J. Wallin;A. Antunes

  • Affiliations:
  • Institute for Computational Sciences and Informatics, George Mason University, Fairfax, Virginia 22030;Institute for Computational Sciences and Informatics, George Mason University, Fairfax, Virginia 22030;Institute for Computational Sciences and Informatics, George Mason University, Fairfax, Virginia 22030;Institute for Computational Sciences and Informatics, George Mason University, Fairfax, Virginia 22030;Institute for Computational Sciences and Informatics, George Mason University, Fairfax, Virginia 22030

  • Venue:
  • Journal of Computational Physics
  • Year:
  • 2002

Quantified Score

Hi-index 31.45

Visualization

Abstract

We present a performance comparison of tree data structures for N-body simulation. The tree data structures examined are the balanced binary tree and the Barnes-Hut (BH) tree. Previous work has compared the performance of BH trees with that of nearest-neighbor trees and the fast multipole method, but the relative merits of BH and binary trees have not been compared systematically. In carrying out this work, a very general computational tool which permits controlled comparison of different tree algorithms was developed. The test problems of interest involve both long-range physics (e.g,, gravity) and short-range physics (e.g., smoothed particle hydrodynamics). Our findings show that the Barnes-Hut tree outperforms the binary tree in both cases. However, we present a modified binary tree which is competitive with the Barnes-Hut tree for long-range physics and superior for short-range physics. Thus, if the local search time is a significant portion of the computational effort, a binary tree could offer performance advantages. This result is of particular interest since short-range searches are common in many areas of computational physics, as well as areas outside the scope of N-body simulation such as computational geometry. The possible reasons for this are outlined and suggestions for future algorithm evaluations are given.