Abstract
Recursive data structures (lists, trees, graphs, etc.) are used throughout scientific and commercial software. The common approach is to allocate storage to the individual nodes of such structures dynamically, maintaining the logical connection between them via pointers. Once such a data structure goes through a sequence of updates (inserts and deletes), it may get scattered all over memory yielding poor spatial locality, which in turn introduces many cache misses. In this paper we present the new concept of Virtual Cache Lines (VCLs). Basically, the mechanism keeps groups of consecutive nodes in close proximity, forming virtual cache lines, while allowing the groups to be stored arbitrarily far away from each other. Virtual cache lines increase the spatial locality of the given data structure resulting in better locality of references. Furthermore, since the spatial locality is improved, software prefetching becomes much more attractive. Indeed, we also present a software prefetching algorithm that can be used when dealing with VCLs resulting in even higher data cache performance. Our results show that the average performance of linked list operations, like scan, insert, and delete can be improved by more than 200% even in architectures that do not support prefetching, like the Intel Pentium. Moreover, when using prefetching one can gain additional 100% improvement. We believe that given a program that manipulates certain recursive data structures, compilers will be able to generate VCL-based code. Also, until this vision becomes true, VCLs can be used to build more efficient user libraries, operating-systems and applications programs.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Mowry, T.C.: Tolerating-Latency Through Software-Controlled Data Prefetching. Ph.D. thesis, Stanford University (1994)
Bennet, J.E., Flynn, M.J.: Reducing Cache Miss Rates Using Prediction Caches. Stanford University, CSL-TR-96-707 (1996)
Pentium Processor Family Developer Manual Vol 3. Intel, Edition (1995)
Shanley, T.: PowerPc 601 Architecture. MindShare Press (1994)
Luk, C.-K., Mowry, T.C.: Compiler-Based Prefetching for Recursive Data structures. In: Proceeding of the 7th International Conference on Architectural Support for Programming Languages and Operating Systems (1996)
Gupta, J., Hennessy, K., Gharachorloo, T.: Comparative Evaluation of Latency Reducing and Tolerating Techniques. In: Proceedings of the 18th Annual International Symposium on Computer Architecture (1991)
Lebeck, A.R., Wood, D.A.: Cache Profiling and the SPEC Bencmark. A Case Study. IEEE Computer 27(10) (October 1994)
Musser, R., Saini, A.: STL Tutorial and Reference Guide. Addison Wesley, Reading (1995)
Shapiro, M., Horwitz, S.: Fast and Accurate Flow-Intensive Points to Analysis. In: Conference Record of the 24th ACM Symposium on Principles of Programming Languages (1997)
Sagiv, T.R., Wilhem, R.: Solving Shape-analysis Problems in Languages with destructive Updating. In: Conference Record of the 23th ACM Symposium on Principles of Programming Languages (1996)
Bernstein, D., Cohen, D., Freund, A., Mayden, D.: Compiler Techniques for Data Prefetching on the PowerPC. In: Proceedings of the International Conference of Parallel Architectures and Compilation Techniques (June 1995)
Callahan, D., Kennedy, K., Porterfield, A.: Software Prefetching. In: Proceeding of the 2sc International Conference on Architectural Support for Programming Languages and Operating Systems (1991)
Bayer, R., McCreight, E.M.: Organization and Maintenance of Large Ordered Indexes. Acta Informatica 1(3), 173–189 (1972)
Pettis, K., Hansen, R.C.: Profile Guided Code Positionig. In: proceeding of the ACM SIGPLAN Conference on Programming Language Design and Implementation (1990)
Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. To appear Conference Record of the Twenty-Sixth ACM Symposium on Principles of Programming Languages, New York (1999)
Chilimbi, T., Larus, J., Hill, M.: Improving Pointer-Based Codes Through Cache-Conscious Data Placement, Wisconsin University Technical Report CS-TR-98-1365 (1998)
Calder, B., Krintz, C., John, S., Austin, T.: Cache-Conscious Data Placement. In: 8th International Conference on Architectural Support for Programming Languages and Operating Systems (1998)
Hwu, W.W., Chang, P.P.: Achieving High Instruction Cache Performance with an Optimizing Compiler. In: Proceedings of the 16th International Symposium on Computer Architecture (1989)
Lam, M.: Software Pipelining: An Effective Scheduling Technique for VLIW Machines. In: Proceedings of the SIGPLAN Annual Symposium (1988)
Lam, M.S., Rothberg, E.E., Wolf, M.E.: The Cache Performance and Optimizations of Blocked Algorithms. In: Proceeding of the 2sc International Conference on Architectural Support for Programming Languages and Operating Systems (1991)
Chilimbi, T.M., Larus, J.R.: Using Generational Garbage Collection to Implement Cache-Conscious Data Placement. In: The International Symposium on Memory Management (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Rubin, S., Bernstein, D., Rodeh, M. (1999). Virtual Cache Line: A New Technique to Improve Cache Exploitation for Recursive Data Structures. In: Jähnichen, S. (eds) Compiler Construction. CC 1999. Lecture Notes in Computer Science, vol 1575. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-49051-7_18
Download citation
DOI: https://doi.org/10.1007/978-3-540-49051-7_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65717-0
Online ISBN: 978-3-540-49051-7
eBook Packages: Springer Book Archive