Tail Call Optimization Tailored for Native Stack Utilization in JavaScript Runtimes
JavaScript has significantly evolved, broadening its capabilities. However, the uptake of tail call optimization (TCO) remains limited, largely due to concerns about debugging difficulties and the potential increase in overall complexity. This paper highlights the compelling importance of tail calls...
Saved in:
| Published in: | IEEE access Vol. 12; pp. 111801 - 111817 |
|---|---|
| Main Authors: | , |
| Format: | Journal Article |
| Language: | English |
| Published: |
IEEE
2024
|
| Subjects: | |
| ISSN: | 2169-3536, 2169-3536 |
| Online Access: | Get full text |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Abstract | JavaScript has significantly evolved, broadening its capabilities. However, the uptake of tail call optimization (TCO) remains limited, largely due to concerns about debugging difficulties and the potential increase in overall complexity. This paper highlights the compelling importance of tail calls within web applications, advocating for TCO as a means to boost performance and enhance memory efficiency. We present an innovative TCO technique that leverages the native stack within JavaScript engines, capitalizing on the native stack's inherent benefits over heap memory. This technique is carefully crafted to comply with diverse TCO standards, prioritizing simplicity and providing debugging features. We tackle the inherent challenges of TCO and successfully deploy our method in a lightweight JavaScript engine. Our approach is rigorously evaluated, proving its effectiveness and practicality. Notably, our implementation facilitates considerable memory savings for web applications, comparable to the maximum Resident Set Size (RSS), and achieves an average performance improvement of approximately 19.8% for algorithms that are heavily recursive. This research not only demonstrates the versatility and efficiency of our TCO strategy but also makes a significant contribution to the wider adoption and comprehension of TCO, thereby improving JavaScript engines' performance and memory management efficiency. |
|---|---|
| AbstractList | JavaScript has significantly evolved, broadening its capabilities. However, the uptake of tail call optimization (TCO) remains limited, largely due to concerns about debugging difficulties and the potential increase in overall complexity. This paper highlights the compelling importance of tail calls within web applications, advocating for TCO as a means to boost performance and enhance memory efficiency. We present an innovative TCO technique that leverages the native stack within JavaScript engines, capitalizing on the native stack's inherent benefits over heap memory. This technique is carefully crafted to comply with diverse TCO standards, prioritizing simplicity and providing debugging features. We tackle the inherent challenges of TCO and successfully deploy our method in a lightweight JavaScript engine. Our approach is rigorously evaluated, proving its effectiveness and practicality. Notably, our implementation facilitates considerable memory savings for web applications, comparable to the maximum Resident Set Size (RSS), and achieves an average performance improvement of approximately 19.8% for algorithms that are heavily recursive. This research not only demonstrates the versatility and efficiency of our TCO strategy but also makes a significant contribution to the wider adoption and comprehension of TCO, thereby improving JavaScript engines' performance and memory management efficiency. |
| Author | Park, Hyukwoo Kim, Seonghyun |
| Author_xml | – sequence: 1 givenname: Hyukwoo orcidid: 0000-0002-8525-0652 surname: Park fullname: Park, Hyukwoo email: hyukwoo.park@samsung.com organization: Samsung Research, Samsung Seoul Research and Development Campus, Seocho-gu, Seoul, Republic of Korea – sequence: 2 givenname: Seonghyun surname: Kim fullname: Kim, Seonghyun organization: Samsung Research, Samsung Seoul Research and Development Campus, Seocho-gu, Seoul, Republic of Korea |
| BookMark | eNpNkN1OwkAQhTcGExF5Ar3YFwD3r116SRpUDJHEwvVmurs1i6VLtpVEn97FqmHmYiYnc75kzjUaNL6xCN1SMqWUZPfzPF8UxZQRJqZcCCoTcoGGjKbZhCc8HZztV2jctjsSaxalRA5RsQFX4xzqGq8Pndu7L-icb_BJ9sEaXPmAX6J2tLjoQL_jbefqvyvX4Gc4QqGDO3T49aOJBNveoMsK6taOf-cIbR8Wm_xpslo_LvP5aqI5p90ESs1Tqw2pSs6MNIZRnZZaa0EYldYaymhSasmI4NImTEphMsNAZpmOXfIRWvZc42GnDsHtIXwqD079CD68KQid07VVAspylsjMUq4Fje8DpwQkjcgECIPI4j1LB9-2wVb_PErUKWbVx6xOMavfmKPrrnc5a-2ZI-WczVL-DbKze0c |
| CODEN | IAECCG |
| Cites_doi | 10.1145/3140587.3062363 10.1145/1809028.1806598 10.1145/2714576.2714635 10.1109/icdsc.2001.918971 10.1145/1966913.1966920 10.1145/2398857.2384660 10.1016/S1571-0661(05)80459-1 10.1007/978-3-642-02918-9_6 10.1007/978-3-319-26529-2_2 10.1109/MIC.2010.145 10.1007/978-3-642-04444-1_31 10.1145/1920261.1920267 10.1145/2661103.2661108 10.1145/3178372.3179499 |
| ContentType | Journal Article |
| DBID | 97E ESBDL RIA RIE AAYXX CITATION DOA |
| DOI | 10.1109/ACCESS.2024.3441750 |
| DatabaseName | IEEE All-Society Periodicals Package (ASPP) 2005–Present IEEE Xplore Open Access Journals IEEE All-Society Periodicals Package (ASPP) 1998–Present IEEE Electronic Library (IEL) CrossRef Open Access: DOAJ - Directory of Open Access Journals |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | |
| Database_xml | – sequence: 1 dbid: DOA name: DOAJ Directory of Open Access Journals url: https://www.doaj.org/ sourceTypes: Open Website – sequence: 2 dbid: RIE name: IEEE Xplore url: https://ieeexplore.ieee.org/ sourceTypes: Publisher |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Engineering |
| EISSN | 2169-3536 |
| EndPage | 111817 |
| ExternalDocumentID | oai_doaj_org_article_4abb8579e13c41008a310a7174d5a02a 10_1109_ACCESS_2024_3441750 10633286 |
| Genre | orig-research |
| GrantInformation_xml | – fundername: Samsung Research, Samsung Electronics Company Ltd |
| GroupedDBID | 0R~ 4.4 5VS 6IK 97E AAJGR ABAZT ABVLG ACGFS ADBBV AGSQL ALMA_UNASSIGNED_HOLDINGS BCNDV BEFXN BFFAM BGNUA BKEBE BPEOZ EBS EJD ESBDL GROUPED_DOAJ IPLJI JAVBF KQ8 M43 M~E O9- OCL OK1 RIA RIE RNS AAYXX CITATION |
| ID | FETCH-LOGICAL-c331t-abc36ecd0fb32d7dd21c6bccc40217eed1215bc720437e52774d9d2a799c9c9b3 |
| IEDL.DBID | DOA |
| ISICitedReferencesCount | 0 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001297203700001&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 2169-3536 |
| IngestDate | Mon Nov 10 04:31:24 EST 2025 Sat Nov 29 04:27:01 EST 2025 Wed Aug 27 02:59:36 EDT 2025 |
| IsDoiOpenAccess | true |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Language | English |
| License | https://creativecommons.org/licenses/by/4.0/legalcode |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-c331t-abc36ecd0fb32d7dd21c6bccc40217eed1215bc720437e52774d9d2a799c9c9b3 |
| ORCID | 0000-0002-8525-0652 |
| OpenAccessLink | https://doaj.org/article/4abb8579e13c41008a310a7174d5a02a |
| PageCount | 17 |
| ParticipantIDs | doaj_primary_oai_doaj_org_article_4abb8579e13c41008a310a7174d5a02a ieee_primary_10633286 crossref_primary_10_1109_ACCESS_2024_3441750 |
| PublicationCentury | 2000 |
| PublicationDate | 20240000 2024-00-00 2024-01-01 |
| PublicationDateYYYYMMDD | 2024-01-01 |
| PublicationDate_xml | – year: 2024 text: 20240000 |
| PublicationDecade | 2020 |
| PublicationTitle | IEEE access |
| PublicationTitleAbbrev | Access |
| PublicationYear | 2024 |
| Publisher | IEEE |
| Publisher_xml | – name: IEEE |
| References | ref35 ref34 (ref4) 2023 ref31 ref33 (ref28) 2024 (ref15) 2024 ref1 (ref10) 2024 ref17 Hickey (ref37) 2022 ref38 ref19 Zaytsev (ref7) 2024 ref18 Williams (ref2) 2014 Kaczor (ref36) 2018 Terlson (ref8) 2016 (ref12) 2024 (ref26) 2016 (ref11) 2019 Smilkov (ref3) (ref27) 2023 ref24 ref23 (ref5) 2023 (ref14) 2024 ref20 ref22 ref21 Abelson (ref16) 2022 (ref6) 2015 Vaarala (ref25) 2022 (ref29) 2024 (ref30) 2024 Rossberg (ref32) 2024 (ref9) 2024 (ref13) 2024 |
| References_xml | – ident: ref31 doi: 10.1145/3140587.3062363 – volume-title: KinomaJS JavaScript Runtime year: 2016 ident: ref26 – volume-title: Web Tooling Benchmark year: 2019 ident: ref11 – ident: ref17 doi: 10.1145/1809028.1806598 – volume-title: babel-Plugin-Tailcall-Optimization year: 2018 ident: ref36 – volume-title: Escargot Open-Source JavaScript Engine year: 2024 ident: ref12 – ident: ref22 doi: 10.1145/2714576.2714635 – volume-title: WebAssembly Specification With Tail Calls year: 2024 ident: ref32 – ident: ref23 doi: 10.1109/icdsc.2001.918971 – volume-title: ECMAScript 2023 Language Specification year: 2023 ident: ref5 – volume-title: Syntactic Tail Calls year: 2016 ident: ref8 – ident: ref24 doi: 10.1145/1966913.1966920 – volume-title: Espruino year: 2014 ident: ref2 – volume-title: GCC Manual: Optimize-Options year: 2024 ident: ref29 – volume-title: WebKitGTK year: 2024 ident: ref9 – volume-title: V8 JavaScript Engine year: 2024 ident: ref13 – volume-title: JavaScriptCore Built-in JavaScript Engine for WebKit year: 2024 ident: ref14 – volume-title: ECMAScript Compatibility Tables: ES6 Features year: 2024 ident: ref7 – volume-title: The State of Open Source and Rise of AI in 2023: The Most Popular Programming Languages year: 2023 ident: ref4 – volume-title: SpiderMonkey JavaScript/WebAssembly Engine year: 2024 ident: ref15 – ident: ref21 doi: 10.1145/2398857.2384660 – ident: ref33 doi: 10.1016/S1571-0661(05)80459-1 – ident: ref20 doi: 10.1007/978-3-642-02918-9_6 – volume-title: The LLVM Target-Independent Code Generator year: 2024 ident: ref30 – ident: ref34 doi: 10.1007/978-3-319-26529-2_2 – volume-title: ClojureScript: Clojure to JS Compiler year: 2022 ident: ref37 – ident: ref1 doi: 10.1109/MIC.2010.145 – volume-title: Safari Browser year: 2024 ident: ref10 – start-page: 48 volume-title: Structure and Interpretation of Computer Programs year: 2022 ident: ref16 article-title: Building abstractions with functions – ident: ref19 doi: 10.1007/978-3-642-04444-1_31 – volume-title: ECMAScript 2015 Language Specification year: 2015 ident: ref6 – ident: ref18 doi: 10.1145/1920261.1920267 – ident: ref38 doi: 10.1145/2661103.2661108 – volume-title: Duktape 2.7.0 year: 2022 ident: ref25 – volume-title: Moddable SDK 4.2.1 year: 2023 ident: ref27 – volume-title: Official ECMAScript Conformance Test Suite year: 2024 ident: ref28 – start-page: 309 volume-title: Proc. SysML ident: ref3 article-title: TensorFlow.js: Machine learning for the web and beyond – ident: ref35 doi: 10.1145/3178372.3179499 |
| SSID | ssj0000816957 |
| Score | 2.2996848 |
| Snippet | JavaScript has significantly evolved, broadening its capabilities. However, the uptake of tail call optimization (TCO) remains limited, largely due to concerns... |
| SourceID | doaj crossref ieee |
| SourceType | Open Website Index Database Publisher |
| StartPage | 111801 |
| SubjectTerms | Code optimization Codes compiler Engines interpreter Java JavaScript JavaScript engine Memory management Optimization methods Program processors Runtime tail call optimization |
| SummonAdditionalLinks | – databaseName: IEEE Electronic Library (IEL) dbid: RIE link: http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV07T8MwELagYoCBN6K85IGRlDhO4nosFRViKIiC1C06-1ypog_U1-_H54SqDAwoS2RZOucuZ5_Pvu9j7Faopp8BBEYgAaMUnYogocs0Fh2oAVqBg0A2obrdZr-vX6ti9VAL45wLl89cg17DWT5O7ZJSZd7DcymTZr7NtpXKy2KtdUKFGCR0pipkIRHr-1a77T_C7wGTtCGJaouK6zdWnwDS_4tVJSwqnYN_DueQ7VfRI2-V5j5iW25yzPY2MAVPWO8dhiPehtGIv_jpYFzVWXJq9gKQ-yiVdwPcN_eRpv3kH4vh6KfXcMKfYQW9MJfwN-KRGLv5KfvoPL63n6KKOSGyUopFBMbK3FmMB0YmqBATYXNjrU1pC-KXRcKUMJYIaqRyWeJjQNSYgNLa-sfIM1abTCfunPEYZGyFRikHkHrn10jVQULlWWqMMFmd3f1otPgqATKKsLGIdVEaoCADFJUB6uyBtL7uSujWocFrtqicpUjBmGamtBPSpoQ-BD4IBS80xQziBOrslKyxIa80xMUf7Zdsl8ZQZk6uWG0xW7prtmNXi-F8dhN-o29zQsd2 priority: 102 providerName: IEEE |
| Title | Tail Call Optimization Tailored for Native Stack Utilization in JavaScript Runtimes |
| URI | https://ieeexplore.ieee.org/document/10633286 https://doaj.org/article/4abb8579e13c41008a310a7174d5a02a |
| Volume | 12 |
| WOSCitedRecordID | wos001297203700001&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVAON databaseName: DOAJ Directory of Open Access Journals customDbUrl: eissn: 2169-3536 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0000816957 issn: 2169-3536 databaseCode: DOA dateStart: 20130101 isFulltext: true titleUrlDefault: https://www.doaj.org/ providerName: Directory of Open Access Journals – providerCode: PRVHPJ databaseName: ROAD: Directory of Open Access Scholarly Resources customDbUrl: eissn: 2169-3536 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0000816957 issn: 2169-3536 databaseCode: M~E dateStart: 20130101 isFulltext: true titleUrlDefault: https://road.issn.org providerName: ISSN International Centre |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwrV3NS8MwFA8yPOhB_Jg4P0YOHq1rmrRpjrNsiOAUt8FuJV-FYtfJVnf0bzdJO6knL1LoIYQ2fa95-b2Q9_sBcItobCIAUh7HXHlEaerxwB6mkUpzmimJVObEJuhkEi8W7LUl9WXPhNX0wLXhBoQLEYeUaYQlsUw03AASbpIQokLuBw4a-ZS1kikXg2MUsZA2NEPIZ4NhkpgvMglhQO6x1d2ylfatpcgx9v-SWHErzPgYHDXQEA7rIZ2APV2egsMWYeAZmM54XsCEFwV8MXN92RRRQtu8WmsFDQSFE8flDQ2MlO9wXuXFrldewie-5VMXKOCbFYlY6k0XzMejWfLoNbIInsQYVR4XEkdaKj8TOFBUqQDJSEgpic0vzJpnCSOEtOozmOowMABPMRVwypg0l8DnoFOuSn0BoM-xLxFTGGecmJnNlC39QTQKiRBIhD1wt7NQ-lGzX6Qua_BZWhs0tQZNG4P2wIO14k9XS13tGoxD08ah6V8O7YGu9UHrfRHGQRxd_sfDr8CBHXC9h3INOtX6U9-Afbmt8s267_4hc3_-GvVdJeA3SXLLKA |
| linkProvider | Directory of Open Access Journals |
| linkToHtml | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LT9wwEB61FIlyaAulYvvCB46Exo_E6yNdFdFCFwSLxC0ae7zSimVBsPD78TgBbQ8cqlwiy9I4Mxl7PPZ8H8C2tP00A0gqUCMVhqItUPFlmkAR7ZiCpHEmm7DDYf_iwp10xeq5FibGmC-fxV1-zWf5dB3uOVWWPLzWWvXr1_CmMkaVbbnWc0qFOSRcZTtsIVm6H3uDQfqMtAtUZlcz2RaX1y-sPxmm_x9elbys7L__zwF9gHdd_Cj2WoOvwas4W4fVBVTBj3A2wslUDHA6FcdpQrjqKi0FNycBJFKcKoYZ8FukWDNcivP5ZPrUazITf_ABz_JsIk6ZSeIq3m3A-f6v0eCg6LgTiqC1nBfog65joHLstSJLpGSofQjB8CYkLYyMKuEDU9RoGyuVokBypNA6F9Lj9SdYml3P4iaIEnUZpCOtx2iS-zvi-iBp68p4L33Vg50njTY3LURGk7cWpWtaAzRsgKYzQA9-stafuzK-dW5Imm06d2kMet-vrItSB8P4Q5jCUExCDVVYKuzBBltjQV5riM8vtG_BysHo71Fz9Ht4-AXe8njaPMpXWJrf3sdvsBwe5pO72-_5l3oE_iHKvQ |
| 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%3Ajournal&rft.genre=article&rft.atitle=Tail+Call+Optimization+Tailored+for+Native+Stack+Utilization+in+JavaScript+Runtimes&rft.jtitle=IEEE+access&rft.au=Park%2C+Hyukwoo&rft.au=Kim%2C+Seonghyun&rft.date=2024&rft.issn=2169-3536&rft.eissn=2169-3536&rft.volume=12&rft.spage=111801&rft.epage=111817&rft_id=info:doi/10.1109%2FACCESS.2024.3441750&rft.externalDBID=n%2Fa&rft.externalDocID=10_1109_ACCESS_2024_3441750 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2169-3536&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2169-3536&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2169-3536&client=summon |