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
Go to the corresponding LIPIcs Volume Portal

Serrano, Manuel

JavaScript Sealed Classes

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


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

  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 =		{},
  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):
Software (Source Code):

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