Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3141871.3141873acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Accelerate JavaScript applications by cross-compiling to WebAssembly

Published: 24 October 2017 Publication History
  • Get Citation Alerts
  • Abstract

    Although the performance of today's JavaScript engines is sufficient for most web applications, faster and more predictable runtimes could be desired for performance-critical web code. Therefore, we present Speedy.js, a cross-compiler that translates JavaScript/TypeScript to WebAssembly, a new standard for native execution supported by all major browsers. Speedy.js only imposes minimal restrictions on the JavaScript code, namely that the performance-critical functions are wrapped in TypeScript and only engage a performance-optimal subset of the JavaScript language. With this approach, we manage to make compute-intense web code up to four times faster, while reducing runtime fluctuations to the half.

    References

    [1]
    Alfred V Aho, Ravi Sethi, and Jeffrey D Ullman. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.
    [2]
    Zakai Alon. 2017. Binaryen. (2017). https://goo.gl/4Pk5Kw
    [3]
    Alexey Andreev. 2017. TeaVM. (2017). https://goo.gl/sDMWyV
    [4]
    Michael Bebenita. 2017. LLJS. (2017). https://goo.gl/9kIua4
    [5]
    Lin Clark. 2017. What makes WebAssembly fast? (2017). https: //goo.gl/20JjFq
    [6]
    Lin Clark. 2017. Where is WebAssembly now and what’s next? (2017). https://goo.gl/M7nq91
    [7]
    Kevin Decker. 2017. Six Speed. (2017). https://goo.gl/b1Kg7b
    [8]
    Katelyn Gadd. 2017. ilwasm. (2017). https://goo.gl/Z4AeGT
    [9]
    Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman, and Google Mozilla. 2017. Bringing the Web up to Speed with WebAssembly. PLDI17 (2017).
    [10]
    David Herman, Wagner Luke, and Alon Zakai. 2014. asm.js. (2014). https://goo.gl/sxWVss
    [11]
    Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-directed and Runtime Optimization (CGO ’04). IEEE Computer Society, Washington, DC, USA, 75—-.
    [12]
    LLVM Project. 2017. LLVM Tutorial. (2017). https://goo.gl/DCSU2v
    [13]
    Mozilla. 2017. ARE WE FAST YET? (2017). https://arewefastyet.com
    [14]
    Axel Rauschmayer. 2015. Google SoundScript: faster OOP for JavaScript. (2015). https://goo.gl/mZaFSJ
    [15]
    Micha Reiser. 2017. Speedy.js. (2017). https://goo.gl/kbzKLn
    [16]
    Micha Reiser. 2017. TypeScript with Int Support. (2017). https://goo. gl/BtPPj9
    [17]
    Andreas Rossberg. 2015. Experimental New Directions for JavaScript. (2015). https://goo.gl/YQknPp
    [18]
    Andreas Rossberg. 2015. Strong Mode Proposal. (2015). https://goo.gl/ wOb9ry
    [19]
    Andreas Rossberg. 2016. An update on strong mode. (2016). https: //goo.gl/1I2eIz
    [20]
    Andreas Rossberg. 2017. GC Extension. (2017). https://goo.gl/Jce6eu
    [21]
    The Rust Core Team. 2016. Announcing Rust 1.14 - The Rust Programming Language Blog. (2016). https://goo.gl/UqCp72
    [22]
    University of Waterloo. 2017. National Traveling Salesman Problems. (2017). https://goo.gl/D6VULu
    [23]
    Maneesh Varshney. 2011. SIM.JS | Discrete Event Simulation in JavaScript. (2011). http://www.simjs.com/
    [24]
    Luke Wagner. 2016. WebAssembly Browser Preview. (2016). https: //goo.gl/Ar5lvG
    [25]
    Luke Wagner. 2017. WebAssembly consensus and end of Browser Preview. (2017). https://goo.gl/cdxlGI
    [26]
    WebAssembly Community Group. 2017. Features to add after the MVP - WebAssembly. (2017). https://goo.gl/Lo5ILA
    [27]
    WebAssembly Community Group. 2017. WebAssembly Specification. (2017). https://webassembly.github.io/spec/
    [28]
    Daniel Wirtz. 2017. AssemblyScript. (2017). https://goo.gl/d8oxVr
    [29]
    Alon Zakai. 2011. Emscripten: An LLVM-to-JavaScript Compiler. In Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion (OOPSLA ’11). ACM, New York, NY, USA, 301–312.
    [30]
    Alon Zakai. 2017. Emscripten. (2017). http://emscripten.org
    [31]
    Alon Zakai. 2017. Why WebAssembly is Faster Than asm.js. (2017). https://goo.gl/5iTDI6
    [32]
    Alon Zakai and Robert Nyman. 2013. Gap between asm.js and native performance gets even narrower with float32 optimizations. (2013). https://goo.gl/5PZ2jK

    Cited By

    View all
    • (2024)VM Matters: A Comparison of WASM VMs and EVMs in the Performance of Blockchain Smart ContractsACM Transactions on Modeling and Performance Evaluation of Computing Systems10.1145/36411039:2(1-24)Online publication date: 27-Jan-2024
    • (2023)An Online Course of Dynamics and Kinematics Physics Education Using eXtended Reality (XR) Technologies.Dynamic Curriculum Development and Design Strategies for Effective Online Learning in Higher Education10.4018/978-1-6684-8646-7.ch011(196-219)Online publication date: 1-Sep-2023
    • (2023)Webcam eye tracking close to laboratory standards: Comparing a new webcam-based system and the EyeLink 1000Behavior Research Methods10.3758/s13428-023-02237-856:5(5002-5022)Online publication date: 11-Oct-2023
    • Show More Cited By

    Index Terms

    1. Accelerate JavaScript applications by cross-compiling to WebAssembly

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        VMIL 2017: Proceedings of the 9th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages
        October 2017
        27 pages
        ISBN:9781450355193
        DOI:10.1145/3141871
        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Sponsors

        In-Cooperation

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 24 October 2017

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. Cross-Compilation
        2. JavaScript
        3. LLVM
        4. Optimization
        5. TypeScript
        6. WebAssembly

        Qualifiers

        • Research-article

        Conference

        SPLASH '17
        Sponsor:

        Acceptance Rates

        Overall Acceptance Rate 4 of 4 submissions, 100%

        Upcoming Conference

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)71
        • Downloads (Last 6 weeks)2
        Reflects downloads up to 11 Aug 2024

        Other Metrics

        Citations

        Cited By

        View all
        • (2024)VM Matters: A Comparison of WASM VMs and EVMs in the Performance of Blockchain Smart ContractsACM Transactions on Modeling and Performance Evaluation of Computing Systems10.1145/36411039:2(1-24)Online publication date: 27-Jan-2024
        • (2023)An Online Course of Dynamics and Kinematics Physics Education Using eXtended Reality (XR) Technologies.Dynamic Curriculum Development and Design Strategies for Effective Online Learning in Higher Education10.4018/978-1-6684-8646-7.ch011(196-219)Online publication date: 1-Sep-2023
        • (2023)Webcam eye tracking close to laboratory standards: Comparing a new webcam-based system and the EyeLink 1000Behavior Research Methods10.3758/s13428-023-02237-856:5(5002-5022)Online publication date: 11-Oct-2023
        • (2023)Transpilers: A Systematic Mapping Review of Their Usage in Research and IndustryApplied Sciences10.3390/app1306366713:6(3667)Online publication date: 13-Mar-2023
        • (2023)The Next Evolution of Web Browser Execution Environment Performance2023 International Conference on Artificial Intelligence, Big Data, Computing and Data Communication Systems (icABCD)10.1109/icABCD59051.2023.10220564(1-7)Online publication date: 3-Aug-2023
        • (2023)Detecting JavaScript Transpiler Bugs with Grammar-guided Mutation2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER56733.2023.00058(558-568)Online publication date: Mar-2023
        • (2023)A Systematic Review of WebAssembly VS Javascript Performance Comparison2023 International Conference on Information Management and Technology (ICIMTech)10.1109/ICIMTech59029.2023.10277917(241-246)Online publication date: 24-Aug-2023
        • (2023)Revealing Performance Issues in Server-Side WebAssembly Runtimes Via Differential Testing2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00088(661-672)Online publication date: 11-Sep-2023
        • (2023)Waiter and AUTRATAC: Don’t Throw It Away, Just Delay!Web Engineering10.1007/978-3-031-34444-2_20(278-292)Online publication date: 16-Jun-2023
        • (2022)Comparing the Energy Efficiency of WebAssembly and JavaScript in Web Applications on Android Mobile DevicesProceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering10.1145/3530019.3530034(140-149)Online publication date: 13-Jun-2022
        • Show More Cited By

        View Options

        Get Access

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media