skip to main content
10.1145/2576195.2576205acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
research-article

A fast abstract syntax tree interpreter for R

Published:01 March 2014Publication History

ABSTRACT

Dynamic languages have been gaining popularity to the point that their performance is starting to matter. The effort required to develop a production-quality, high-performance runtime is, however, staggering and the expertise required to do so is often out of reach of the community maintaining a particular language. Many domain specific languages remain stuck with naive implementations, as they are easy to write and simple to maintain for domain scientists. In this paper, we try to see how far one can push a naive implementation while remaining portable and not requiring expertise in compilers and runtime systems. We choose the R language, a dynamic language used in statistics, as the target of our experiment and adopt the simplest possible implementation strategy, one based on evaluation of abstract syntax trees. We build our interpreter on top of a Java virtual machine and use only facilities available to all Java programmers. We compare our results to other implementations of R.

References

  1. P. S. Abrams. An APL machine. Ph.D. thesis, Stanford University, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. A. Becker, J. M. Chambers, and A. R. Wilks. The new S language: a programming environment for data analysis and graphics. Wadsworth and Brooks/Cole Advanced Books & Software, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Chambers and D. Ungar. Making pure object oriented languages practical. In Proceedings of Object-Oriented Programming Systems, Languages and Applications (OOPSLA), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Chirokoff, C. Consel, and R. Marlet. Combining program and data specialization. Higher-Order and Symbolic Computation, 12 (4), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Eddelbuettel and C. Sanderson. RcppArmadillo: accelerating R with high-performance C++ linear algebra. Computational Statistics & Data Analysis, 71, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. B. Fulgham and D. Bagley. The computer language benchmarks game. http://benchmarksgame.alioth.debian.org, 2013.Google ScholarGoogle Scholar
  7. A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of Programming Language Design and Implementation (PLDI), 2009. http://doi.acm.org/10.1145/1542476.1542528. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Ihaka and R. Gentleman. R: A language for data analysis and graphics. Journal of Computational and Graphical Statistics, 5 (3), 1996.Google ScholarGoogle Scholar
  9. D. McNamee, J. Walpole, C. Pu, C. Cowan, C. Krasic, A. Goel, P. Wagle, C. Consel, G. Muller, and R. Marlet. Specialization tools and techniques for systematic optimization of system software. ACM Transactions on Computer Systems, 19 (2), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. F. Morandat, B. Hill, L. Osvald, and J. Vitek. Evaluating the design of the R language. In Proceedings of European Conference on Object-Oriented Programming (ECOOP), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. Osvald. R shootout. http://r.cs.purdue.edu/hg/r-shootout, 2012.Google ScholarGoogle Scholar
  12. R Development Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, 2008. http://www.r-project.org.Google ScholarGoogle Scholar
  13. D. Smith. The R ecosystem. In R User Conference (UseR), 2011.Google ScholarGoogle Scholar
  14. J. Talbot, Z. DeVito, and P. Hanrahan. Riposte: a trace-driven compiler and parallel VM for vector code in R. In Proceedings of Parallel Architectures and Compilation Techniques (PACT), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Tierney. A Byte Code Compiler for R. University of Iowa, 2012. http://homepage.stat.uiowa.edu/ luke/R/compiler/compiler.pdf.Google ScholarGoogle Scholar
  16. S. Urbanek. R benchmark 2.5. http://r.research.att.com/benchmarks, 2008.Google ScholarGoogle Scholar
  17. Würthinger, Wimmer, Wöß, Stadler, Duboscq, Humer, Richards, Simon, and Wolczko}Truf13T. Würthinger, C. Wimmer, A. Wöß, L. Stadler, G. Duboscq, C. Humer, G. Richards, D. Simon, and M. Wolczko. One VM to rule them all. In Proceedings of Onward!, the ACM Symposium on New Ideas in Programming and Reflections on Software, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A fast abstract syntax tree interpreter for R

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        VEE '14: Proceedings of the 10th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
        March 2014
        236 pages
        ISBN:9781450327640
        DOI:10.1145/2576195

        Copyright © 2014 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 March 2014

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        VEE '14 Paper Acceptance Rate18of56submissions,32%Overall Acceptance Rate80of235submissions,34%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader