License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2022.24
URN: urn:nbn:de:0030-drops-162523
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2022/16252/
Go to the corresponding LIPIcs Volume Portal


Serrano, Manuel

JavaScript Sealed Classes

pdf-format:
LIPIcs-ECOOP-2022-24.pdf (1 MB)


Abstract

In this work, we study the JavaScript Sealed Classes, which differ from regular classes in a few ways that allow ahead-of-time (AoT) compilers to implement them more efficiently. Sealed classes are compatible with the rest of the language so that they can be combined with all other structures, including regular classes, and can be gradually integrated into existing code bases.
We present the design of the sealed classes and study their implementation in the hopc AoT compiler. We present an in-depth analysis of the speed of sealed classes compared to regular classes. To do so, we assembled a new suite of benchmarks that focuses on the efficiency of the class implementations. On this suite, we found that sealed classes provide an average speedup of 19%. The more classes and methods programs use, the greater the speedup. For the most favorable test that uses them intensively, we measured a speedup of 56%.

BibTeX - Entry

@InProceedings{serrano:LIPIcs.ECOOP.2022.24,
  author =	{Serrano, Manuel},
  title =	{{JavaScript Sealed Classes}},
  booktitle =	{36th European Conference on Object-Oriented Programming (ECOOP 2022)},
  pages =	{24:1--24:27},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-225-9},
  ISSN =	{1868-8969},
  year =	{2022},
  volume =	{222},
  editor =	{Ali, Karim and Vitek, Jan},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2022/16252},
  URN =		{urn:nbn:de:0030-drops-162523},
  doi =		{10.4230/LIPIcs.ECOOP.2022.24},
  annote =	{Keywords: JavaScript, Compiler, Dynamic Languages, Classes, Inline Caches}
}

Keywords: JavaScript, Compiler, Dynamic Languages, Classes, Inline Caches
Collection: 36th European Conference on Object-Oriented Programming (ECOOP 2022)
Issue Date: 2022
Date of publication: 23.06.2022
Supplementary Material: Software (ECOOP 2022 Artifact Evaluation approved artifact): https://doi.org/10.4230/DARTS.8.2.23
Software (Source Code): https://github.com/manuel-serrano/hop.git


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI