skip to main content
10.1145/2851613.2851748acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

A performant scheme interpreter in asm.js

Published: 04 April 2016 Publication History

Abstract

This paper presents the implementation of an efficient interpreter for a Scheme-like language using manually written asm.js code. The asm.js specification defines an optimizable subset of JavaScript which has already served well as a compilation target for web applications where performance is critical. However, its usage as a human-writable language that can be integrated into existing projects to improve performance has remained largely unexplored. We therefore apply this strategy to optimize the implementation of an interpreter. We also discuss the feasibility of this approach, as writing asm.js by hand is generally not its recommended use-case. We therefore present a macro system to solve the challenges we encounter. The resulting interpreter is compared to the original C implementation and its compiled equivalent in asm.js. This way, we evaluate whether manual integration with asm.js provides the necessary performance to bring larger applications and runtimes to the web.

References

[1]
H. Abelson and G. J. Sussman. Structure and Interpretation of Computer Programs. MIT Press, Cambridge, MA, USA, 2nd edition, 1996.
[2]
N. de Bruijn. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae (Proceedings), 75(5):381--392, 1972.
[3]
T. D'Hondt. A brief description of Slip. https://github.com/noahvanes/slip.js/raw/master/varia/Slip.pdf, 2014. {Accessed: 18/09/2015}.
[4]
P. J. Fleming and J. J. Wallace. How not to lie with statistics: The correct way to summarize benchmark results. Commun. ACM, 29(3):218--221, Mar. 1986.
[5]
D. P. Friedman and M. Wand. Essentials of Programming Languages, 3rd Edition. The MIT Press, 3 edition, 2008.
[6]
D. Herman, L. Wagner, and A. Zakai. asm.js specification. http://asmjs.org. {Accessed: 04/08/2015}.
[7]
C. Lattner. LLVM: An Infrastructure for Multi-Stage Optimization. Master's thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL, Dec 2002. See http://llvm.cs.uiuc.edu.
[8]
C. Queinnec. Lisp in Small Pieces. Cambridge University press, Cambridge, 1996.
[9]
A. Zakai. Emscripten: An LLVM-to-JavaScript Compiler. In Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion, OOPSLA '11, pages 301--312, New York, NY, USA, 2011. ACM.

Cited By

View all
  • (2021)A Framework to Run C/C++ Application on Web-based OS2021 14th International Conference on Advanced Computer Theory and Engineering (ICACTE)10.1109/ICACTE53799.2021.00020(76-82)Online publication date: Sep-2021
  • (2021)A Power-on Hardware Self-test Framework in Web-based OS2021 20th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES)10.1109/DCABES52998.2021.00061(218-224)Online publication date: Dec-2021
  • (2019)WebAssembly – Hope for Fast Acceleration of Web Applications Using JavaScriptInformation Systems Architecture and Technology: Proceedings of 40th Anniversary International Conference on Information Systems Architecture and Technology – ISAT 201910.1007/978-3-030-30440-9_26(275-284)Online publication date: 5-Sep-2019

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '16: Proceedings of the 31st Annual ACM Symposium on Applied Computing
April 2016
2360 pages
ISBN:9781450337397
DOI:10.1145/2851613
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 April 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JavaScript
  2. asm.js
  3. optimization

Qualifiers

  • Research-article

Conference

SAC 2016
Sponsor:
SAC 2016: Symposium on Applied Computing
April 4 - 8, 2016
Pisa, Italy

Acceptance Rates

SAC '16 Paper Acceptance Rate 252 of 1,047 submissions, 24%;
Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Upcoming Conference

SAC '25
The 40th ACM/SIGAPP Symposium on Applied Computing
March 31 - April 4, 2025
Catania , Italy

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)2
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2021)A Framework to Run C/C++ Application on Web-based OS2021 14th International Conference on Advanced Computer Theory and Engineering (ICACTE)10.1109/ICACTE53799.2021.00020(76-82)Online publication date: Sep-2021
  • (2021)A Power-on Hardware Self-test Framework in Web-based OS2021 20th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES)10.1109/DCABES52998.2021.00061(218-224)Online publication date: Dec-2021
  • (2019)WebAssembly – Hope for Fast Acceleration of Web Applications Using JavaScriptInformation Systems Architecture and Technology: Proceedings of 40th Anniversary International Conference on Information Systems Architecture and Technology – ISAT 201910.1007/978-3-030-30440-9_26(275-284)Online publication date: 5-Sep-2019

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media