首页 | 本学科首页   官方微博 | 高级检索  
     


When to use splay trees
Authors:Eric K Lee  Charles U Martel
Affiliation:1. Department of Computer Science, University of California at Davis, Davis, CA 95618, U.S.A.Department of Computer Science, University of California at Davis, Davis, CA 95618, U.S.A.;2. Department of Computer Science, University of California at Davis, Davis, CA 95618, U.S.A.
Abstract:In this paper we present new empirical results for splay trees. These results provide a better understanding of how cache performance affects query execution time. Our results show that splay trees can have faster lookup times compared with randomly built binary search trees (BST) under certain settings. In contrast, previous experiments have shown that because of the instruction overhead involved in splaying, splay trees are less efficient in answering queries than randomly built BSTs—even when the data sets are heavily skewed (a favorable setting for splay trees). We show that at large tree sizes the difference in cache performance between the two types of trees is significant. This difference means that splay trees are faster than BSTs for this setting—despite still having a higher instruction count. Based on these results we offer guidelines in terms of tree size, access pattern, and cache size as to when splay trees will likely be more efficient. We also present a new splaying heuristic aimed at reducing instruction count and show that it can improve on standard splaying by 10–27%. Copyright © 2007 John Wiley & Sons, Ltd.
Keywords:splay tree  cache performance  empirical  heuristic
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号