Whose Baseline Compiler is it Anyway?

Compilers face an intrinsic tradeoff between compilation speed and code quality. The tradeoff is particularly stark in a dynamic setting where JIT compilation time contributes to application runtime. Many systems now employ multiple compilation tiers, where one tier offers fast compile speed while a...

Full description

Saved in:
Bibliographic Details
Published inProceedings / International Symposium on Code Generation and Optimization pp. 207 - 220
Main Author Titzer, Ben L.
Format Conference Proceeding
LanguageEnglish
Published IEEE 02.03.2024
Subjects
Online AccessGet full text
ISSN2643-2838
DOI10.1109/CGO57630.2024.10444855

Cover

Abstract Compilers face an intrinsic tradeoff between compilation speed and code quality. The tradeoff is particularly stark in a dynamic setting where JIT compilation time contributes to application runtime. Many systems now employ multiple compilation tiers, where one tier offers fast compile speed while another has much slower compile speed but produces higher quality code. With proper heuristics on when to use each, the overall performance is better than using either compiler in isolation. At the introduction of WebAssembly into the Web platform in 2017, most engines employed optimizing compilers and pre-compiled entire modules before execution. Yet since that time, all Web engines have introduced new "baseline" compiler tiers for Wasm to improve startup time. Further, many new non-web engines have appeared, some of which also employ simple compilers. In this paper, we demystify single-pass compilers for Wasm, explaining their internal algorithms and tradeoffs, as well as providing a detailed empirical study of those employed in production. We show the design of a new single-pass compiler for a research Wasm engine that integrates with an in-place interpreter and host garbage collector using value tags, while also supporting flexible instrumentation. In experiments, we measure the effectiveness of optimizations targeting value tags and find, somewhat surprisingly, that the runtime overhead can be reduced to near zero. We also assess the relative compile speed and execution time of six baseline compilers and place these baseline compilers in a two-dimensional tradeoff space with other execution tiers for Wasm.
AbstractList Compilers face an intrinsic tradeoff between compilation speed and code quality. The tradeoff is particularly stark in a dynamic setting where JIT compilation time contributes to application runtime. Many systems now employ multiple compilation tiers, where one tier offers fast compile speed while another has much slower compile speed but produces higher quality code. With proper heuristics on when to use each, the overall performance is better than using either compiler in isolation. At the introduction of WebAssembly into the Web platform in 2017, most engines employed optimizing compilers and pre-compiled entire modules before execution. Yet since that time, all Web engines have introduced new "baseline" compiler tiers for Wasm to improve startup time. Further, many new non-web engines have appeared, some of which also employ simple compilers. In this paper, we demystify single-pass compilers for Wasm, explaining their internal algorithms and tradeoffs, as well as providing a detailed empirical study of those employed in production. We show the design of a new single-pass compiler for a research Wasm engine that integrates with an in-place interpreter and host garbage collector using value tags, while also supporting flexible instrumentation. In experiments, we measure the effectiveness of optimizations targeting value tags and find, somewhat surprisingly, that the runtime overhead can be reduced to near zero. We also assess the relative compile speed and execution time of six baseline compilers and place these baseline compilers in a two-dimensional tradeoff space with other execution tiers for Wasm.
Author Titzer, Ben L.
Author_xml – sequence: 1
  givenname: Ben L.
  surname: Titzer
  fullname: Titzer, Ben L.
  email: btitzer@andrew.cmu.edu
  organization: Carnegie Mellon University,Software and Societal Systems Department,Pittsburgh,USA
BookMark eNo1z81Kw0AUQOFRKtjWvoHIbFwmvfObuSupQatQ6EZxWWaSOziSJiVTkLy9C3V1dh-cBZv1Q0-M3QkohQBc19u9qayCUoLUpQCttTPmgq2wQqcMKDSAeMnm0mpVSKfcNVvk_AUgKy3UnN1_fA6Z-KPP1KWeeD0cT6mjkafM05lv-unbTw837Cr6LtPqr0v2_vz0Vr8Uu_32td7sCi8RzoWNEoBCIxzYKiBCIyJpFNBSoAgUyQbrWvCNszqa1urgRGNQORAVAKglu_11ExEdTmM6-nE6_G-pH8a9QaI
ContentType Conference Proceeding
DBID 6IE
6IL
CBEJK
RIE
RIL
DOI 10.1109/CGO57630.2024.10444855
DatabaseName IEEE Electronic Library (IEL) Conference Proceedings
IEEE Xplore POP ALL
IEEE Xplore All Conference Proceedings
IEEE Electronic Library (IEL)
IEEE Proceedings Order Plans (POP All) 1998-Present
DatabaseTitleList
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE Electronic Library (IEL)
  url: https://proxy.k.utb.cz/login?url=https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISBN 9798350395099
EISSN 2643-2838
EndPage 220
ExternalDocumentID 10444855
Genre orig-research
GrantInformation_xml – fundername: NSF
  grantid: 2148301
  funderid: 10.13039/100000001
GroupedDBID 29O
6IE
6IF
6IK
6IL
6IN
AAJGR
ABLEC
ADZIZ
ALMA_UNASSIGNED_HOLDINGS
BEFXN
BFFAM
BGNUA
BKEBE
BPEOZ
CBEJK
CHZPO
IEGSK
IPLJI
OCL
RIE
RIL
ID FETCH-LOGICAL-a290t-6f200ebc18067b990c1fe4910debef0efe6b68d0ac864f5d64b81c59380170003
IEDL.DBID RIE
IngestDate Wed Aug 27 02:18:31 EDT 2025
IsPeerReviewed false
IsScholarly true
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a290t-6f200ebc18067b990c1fe4910debef0efe6b68d0ac864f5d64b81c59380170003
PageCount 14
ParticipantIDs ieee_primary_10444855
PublicationCentury 2000
PublicationDate 2024-March-2
PublicationDateYYYYMMDD 2024-03-02
PublicationDate_xml – month: 03
  year: 2024
  text: 2024-March-2
  day: 02
PublicationDecade 2020
PublicationTitle Proceedings / International Symposium on Code Generation and Optimization
PublicationTitleAbbrev CGO
PublicationYear 2024
Publisher IEEE
Publisher_xml – name: IEEE
SSID ssj0027413
ssib057256076
Score 2.3154976
Snippet Compilers face an intrinsic tradeoff between compilation speed and code quality. The tradeoff is particularly stark in a dynamic setting where JIT compilation...
SourceID ieee
SourceType Publisher
StartPage 207
SubjectTerms baseline
Benchmark testing
Codes
compilation time
compilers
Engines
instrumentation WebAssembly
JITs
Optimization
Registers
Resource management
Runtime
single-pass
tradeoff
Title Whose Baseline Compiler is it Anyway?
URI https://ieeexplore.ieee.org/document/10444855
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV1NSwMxEA22J0_1o-I3Oehx12w3SdOTaLEWwerBYm8lyU6wCNvSbpH6652kuxUFwVtYwpLsZPIym3lvCLlw1mKww3ikMoCIW6ciZXAzZNowCYgROsgXPw5kf8gfRmJUktUDFwYAQvIZxL4Z7vKzqV36X2Xo4Zx7MZMaqbWVXJO1qsUj2h68PbZuoq0kLSnBCetcde-f8GidMgwJWzyu3vSjpkqAlF6DDKrBrDNJ3uNlYWL7-Uun8d-j3SHNb_Yefd7g0i7ZgnyPNKryDbT05n1y-fo2XQC91YGTDtT3wD1iTicLOinoTb760KvrJhn27l66_aismhDpVocVkXS48MHYRCEQGQQbmzjgeCrI0F6OgQNppMqYtkpyJzLJjUqs6KTKS-mgkx-Qej7N4ZBQjC0lOGlYW6fcpJnx2i0KuOAIfEaII9L00x7P1sIY42rGx388PyHb_uuHFK7WKakX8yWcIaYX5jzY8gtkD5yn
linkProvider IEEE
linkToHtml http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV1NTwIxEG0UD3rCD4zf9qDHxS7blnIySlRUQA8QuZFtdxqJyWJgicFf77TsYjQx8dY0m6bNdPo63XlvCDmzxmCww3igEoCAG6sCpfEwZLFmEhAjYi9f3OnKVp8_DMQgJ6t7LgwA-OQzqLqm_5efjM3MPZWhh3PuxExWyZrAlljQtYrtI-oOvh26LuOtMMpJwSFrXDTvnvByHTEMCmu8Woz1o6qKB5XbMukW01nkkrxVZ5mums9fSo3_nu8mqXzz9-jzEpm2yAqk26RcFHCguT_vkPOX1_EU6HXsWelA3Rd4SkzoaEpHGb1K5x_x_LJC-rc3vWYryOsmBHGtwbJAWtz6oE2oEIo0wo0JLXC8FyRoMcvAgtRSJSw2SnIrEsm1Co1oRMqJ6aCb75JSOk5hj1CMLiVYqVk9jriOEu3UWxRwwRH6tBD7pOKWPXxfSGMMixUf_NF_StZbvU572L7vPh6SDWcJn9BVOyKlbDKDY0T4TJ94u34B0Jaf9A
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=proceeding&rft.title=Proceedings+%2F+International+Symposium+on+Code+Generation+and+Optimization&rft.atitle=Whose+Baseline+Compiler+is+it+Anyway%3F&rft.au=Titzer%2C+Ben+L.&rft.date=2024-03-02&rft.pub=IEEE&rft.eissn=2643-2838&rft.spage=207&rft.epage=220&rft_id=info:doi/10.1109%2FCGO57630.2024.10444855&rft.externalDocID=10444855