License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/DARTS.8.2.23
URN: urn:nbn:de:0030-drops-162212
Go back to Dagstuhl Artifacts Series

Serrano, Manuel

JavaScript Sealed Classes (Artifact)

DARTS-8-2-23.pdf (0.6 MB)

Evaluation Policy
The artifact has been evaluated as described in the ECOOP 2022 Call for Artifacts and the ACM Artifact Review and Badging Policy.


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 (Artifact)}},
  pages =	{23:1--23:4},
  journal =	{Dagstuhl Artifacts Series},
  ISSN =	{2509-8195},
  year =	{2022},
  volume =	{8},
  number =	{2},
  editor =	{Serrano, Manuel},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{},
  URN =		{urn:nbn:de:0030-drops-162212},
  doi =		{10.4230/DARTS.8.2.23},
  annote =	{Keywords: JavaScript, Compiler, Dynamic Languages, Classes, Inline caches}

Keywords: JavaScript, Compiler, Dynamic Languages, Classes, Inline caches
Collection: DARTS, Volume 8, Issue 2, Special Issue of the 36th European Conference on Object-Oriented Programming (ECOOP 2022)
Issue Date: 2022
Date of publication: 23.06.2022

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