skip to main content
10.1145/3589246.3595374acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Faster APL with Lazy Extensions

Published:06 June 2023Publication History

ABSTRACT

April is a compiler from a subset of the APL language to Common Lisp. To realize a more performant and elegant APL implementation, April now defers the evaluation of certain types of input. This means that the compiler produces code building a tree of "virtual arrays" – objects that represent arrays not yet computed. The object tree's methods are called to write an output array to memory, which may involve performing a second stage of compilation to build an efficient array-generating kernel with the option to emit assembly code for high speed. This evaluation model enables high performance and its component functions can be elegantly specified thanks to the object-oriented programming faculties of Common Lisp.

References

  1. Philip S. Abrams. 1970. An APL Machine (SLAC Report, Vol. 114). Stanford University, Stanford, CA. Google ScholarGoogle Scholar
  2. Linda G. DeMichiel and Richard P. Gabriel. 1987. The Common Lisp Object System: An Overview. In Proceedings of the European Conference on Object-Oriented Programming, Jean Bézivin, Jean-Marie Hullot, Pierre Cointe, and Henry Lieberman (Eds.) (ECOOP ’87, Vol. 1). Springer Berlin, Heidelberg, Germany. 151–170. https://doi.org/10.1007/3-540-47891-4 Google ScholarGoogle ScholarCross RefCross Ref
  3. Elizabeth Gibney. 2022. How many yottabytes in a quettabyte? Extreme numbers get new names. Nature, Nov., https://doi.org/10.1038/d41586-022-03747-9 Google ScholarGoogle ScholarCross RefCross Ref
  4. Paul Graham. 1993. On Lisp. Prentice Hall, New York, NY. 224–229. http://www.paulgraham.com/onlisptext.html Google ScholarGoogle Scholar
  5. John T. Hancock and Taghi M. Khoshgoftaar. 2020. Survey on categorical data for neural networks. Journal of Big Data, 7, 1 (2020), 10 Apr, 41. issn:2196-1115 https://doi.org/10.1186/s40537-020-00305-w Google ScholarGoogle ScholarCross RefCross Ref
  6. Troels Henriksen. 2017. Design and Implementation of the Futhark Programming Language. University of Copenhagen, Faculty of Science Department of Computer Science, Copenhagen. https://di.ku.dk/english/research/phd/phd-theses/2017/Troels_Henriksen_thesis.pdf Google ScholarGoogle Scholar
  7. Troels Henriksen and Cosmin Eugen Oancea. 2013. A T2 Graph-Reduction Approach to Fusion. In Proceedings of the 2nd ACM SIGPLAN Workshop on Functional High-Performance Computing (FHPC ’13). Association for Computing Machinery, New York, NY, USA. 47–58. isbn:9781450323819 https://doi.org/10.1145/2502323.2502328 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Steven G. Johnson. 2017. More Dots: Syntactic Loop Fusion in Julia. https://julialang.org/blog/2017/01/moredots/ Google ScholarGoogle Scholar
  9. Ronald L. Johnston. 1979. The Dynamic Incremental Compiler of APL\ 3000. SIGAPL APL Quote Quad, 9, 4-P1 (1979), May, 82–87. issn:0163-6006 https://doi.org/10.1145/390009.804442 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Alan Kay. 1998. Re: prototypes vs classes was: Re: Sun’s HotSpot. http://wiki.c2.com/?AlanKayOnMessaging Google ScholarGoogle Scholar
  11. Paul Khuong. 2014. How to define new intrinsics in SBCL. https://pvk.ca/Blog/2014/08/16/how-to-define-new-intrinsics-in-sbcl/ Google ScholarGoogle Scholar
  12. Morten Kromberg. 2017. Beauty and the Beast. https://www.dyalog.com/blog/2017/03/beauty-and-the-beast/ Google ScholarGoogle Scholar
  13. Nuno P. Lopes. 2023. Torchy: A Tracing JIT Compiler for PyTorch. In Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction (CC 2023). Association for Computing Machinery, New York, NY, USA. 98–109. isbn:9798400700880 https://doi.org/10.1145/3578360.3580266 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. APL Products and Services. 2016. APL2 Language Summary. IBM Silicon Valley Laboratory, San Jose, CA. 223. Google ScholarGoogle Scholar
  15. Sven-Bodo Scholz. 1998. With-loop-folding in Sac – condensing consecutive array operations. In Proceedings of the 9th International Workshop on Implementation of Functional Languages, Chris Clack, Kevin Hammond, and Tony Davie (Eds.) (IFL ’97, LNCS vol. 1467). Springer Berlin Heidelberg, Berlin, Heidelberg. 72–91. isbn:978-3-540-68528-9 https://doi.org/10.1007/BFb0055425 Google ScholarGoogle ScholarCross RefCross Ref
  16. Andrew Sengul. 2022. April: APL Compiling to Common Lisp. In Proceedings of the European Lisp Symposium (ELS ’22). ACM, New York, NY, USA. 5 pages. https://doi.org/10.5281/zenodo.6381963 Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Faster APL with Lazy Extensions

          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
            ARRAY 2023: Proceedings of the 9th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming
            June 2023
            74 pages
            ISBN:9798400701696
            DOI:10.1145/3589246

            Copyright © 2023 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 the author(s) 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: 6 June 2023

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate17of25submissions,68%

            Upcoming Conference

            PLDI '24
          • Article Metrics

            • Downloads (Last 12 months)78
            • Downloads (Last 6 weeks)5

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader