Implementing a performant scheme interpreter for the web in asm.js.

Saved in:
Bibliographic Details
Title: Implementing a performant scheme interpreter for the web in asm.js.
Authors: Van Es, Noah1 noahves@vub.ac.be, Stievenart, Quentin1 qstieven@vub.ac.be, Nicolay, Jens1 jnicolay@vub.ac.be, D’Hondt, Theo1 tjdhondt@vub.ac.be, De Roover, Coen1 cderoove@vub.ac.be
Source: Computer Languages, Systems & Structures. Sep2017, Vol. 49, p62-81. 20p.
Subjects: JavaScript programming language, Interpreters (Computer programs), Source code, C (Computer program language), Unified modeling language
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 that 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. We also refactor our implementation to assess how more JavaScript code can cohabit with asm.js code, improving maintainability of the implementation while preserving near-native performance. In the case of our interpreter, this improved maintainability enables adding more complex optimizations. We investigate the addition of function inlining, for which we validate the performance gain. [ABSTRACT FROM AUTHOR]
Copyright of Computer Languages, Systems & Structures is the property of Pergamon Press - An Imprint of Elsevier Science and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
FullText Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 123631539
AccessLevel: 6
PubType: Academic Journal
PubTypeId: academicJournal
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: Implementing a performant scheme interpreter for the web in asm.js.
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22Van+Es%2C+Noah%22">Van Es, Noah</searchLink><relatesTo>1</relatesTo><i> noahves@vub.ac.be</i><br /><searchLink fieldCode="AR" term="%22Stievenart%2C+Quentin%22">Stievenart, Quentin</searchLink><relatesTo>1</relatesTo><i> qstieven@vub.ac.be</i><br /><searchLink fieldCode="AR" term="%22Nicolay%2C+Jens%22">Nicolay, Jens</searchLink><relatesTo>1</relatesTo><i> jnicolay@vub.ac.be</i><br /><searchLink fieldCode="AR" term="%22D’Hondt%2C+Theo%22">D’Hondt, Theo</searchLink><relatesTo>1</relatesTo><i> tjdhondt@vub.ac.be</i><br /><searchLink fieldCode="AR" term="%22De+Roover%2C+Coen%22">De Roover, Coen</searchLink><relatesTo>1</relatesTo><i> cderoove@vub.ac.be</i>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Computer+Languages%2C+Systems+%26+Structures%22">Computer Languages, Systems & Structures</searchLink>. Sep2017, Vol. 49, p62-81. 20p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22JavaScript+programming+language%22">JavaScript programming language</searchLink><br /><searchLink fieldCode="DE" term="%22Interpreters+%28Computer+programs%29%22">Interpreters (Computer programs)</searchLink><br /><searchLink fieldCode="DE" term="%22Source+code%22">Source code</searchLink><br /><searchLink fieldCode="DE" term="%22C+%28Computer+program+language%29%22">C (Computer program language)</searchLink><br /><searchLink fieldCode="DE" term="%22Unified+modeling+language%22">Unified modeling language</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: 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 that 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. We also refactor our implementation to assess how more JavaScript code can cohabit with asm.js code, improving maintainability of the implementation while preserving near-native performance. In the case of our interpreter, this improved maintainability enables adding more complex optimizations. We investigate the addition of function inlining, for which we validate the performance gain. [ABSTRACT FROM AUTHOR]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>Copyright of Computer Languages, Systems & Structures is the property of Pergamon Press - An Imprint of Elsevier Science and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=123631539
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1016/j.cl.2017.02.002
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 20
        StartPage: 62
    Subjects:
      – SubjectFull: JavaScript programming language
        Type: general
      – SubjectFull: Interpreters (Computer programs)
        Type: general
      – SubjectFull: Source code
        Type: general
      – SubjectFull: C (Computer program language)
        Type: general
      – SubjectFull: Unified modeling language
        Type: general
    Titles:
      – TitleFull: Implementing a performant scheme interpreter for the web in asm.js.
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: Van Es, Noah
      – PersonEntity:
          Name:
            NameFull: Stievenart, Quentin
      – PersonEntity:
          Name:
            NameFull: Nicolay, Jens
      – PersonEntity:
          Name:
            NameFull: D’Hondt, Theo
      – PersonEntity:
          Name:
            NameFull: De Roover, Coen
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 09
              Text: Sep2017
              Type: published
              Y: 2017
          Identifiers:
            – Type: issn-print
              Value: 14778424
          Numbering:
            – Type: volume
              Value: 49
          Titles:
            – TitleFull: Computer Languages, Systems & Structures
              Type: main
ResultId 1