{"id":22813160,"date":"2026-01-20T09:00:19","date_gmt":"2026-01-20T17:00:19","guid":{"rendered":"https:\/\/thenewstack.io\/?p=22813160"},"modified":"2026-01-20T07:27:09","modified_gmt":"2026-01-20T15:27:09","slug":"webassembly-vs-javascript-testing-side-by-side-performance","status":"publish","type":"post","link":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/","title":{"rendered":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance"},"content":{"rendered":"<p>When we talk about <a href=\"https:\/\/thenewstack.io\/webassembly\/\" class=\"local-link\">WebAssembly<\/a>&nbsp;(Wasm), we often describe it as &ldquo;near-native speed&rdquo; and &ldquo;faster than JavaScript.&rdquo; But what does that actually look like in practice?<\/p>\n<p>Before we get into where Wasm excels, let&rsquo;s level-set: JavaScript is still a developer&rsquo;s best friend when it comes to UI. It was built to manipulate the DOM (the web&#8217;s Document Object Model) and handle CSS updates, and it does that job successfully. But we&rsquo;re watching the demands of the browser change in real time. JavaScript was created in 1995 to add simple interactivity to text pages. Today, we&rsquo;re asking browsers to process 4K video and run complex math that Brendan Eich (<a href=\"https:\/\/thenewstack.io\/brendan-eich-on-creating-javascript-in-10-days-and-what-hed-do-differently-today\/\" class=\"local-link\">JavaScript&rsquo;s creator<\/a>) never envisioned.<\/p>\n<p>I&#8217;ve already written a basic tutorial on <a href=\"https:\/\/thenewstack.io\/when-should-javascript-devs-use-the-power-of-webassembly\/\" class=\"local-link\">how Wasm can boost your JavaScript app&#8217;s performance<\/a>. Following on from that, now I will do some speed comparisons between Wasm and JavaScript.<\/p>\n<h2>Introduction to the Wasm vs. JS Tutorial<\/h2>\n<p>When you move past UI logic and into heavy data processing, JavaScript needs a partner. That&rsquo;s where WebAssembly comes in. But how much faster is Wasm than JavaScript in a real-world scenario? Let&rsquo;s find out.<\/p>\n<p>For this project, we&rsquo;re building a browser-based image processor designed to handle two distinct types of operations:<\/p>\n<ul>\n<li><strong>A &ldquo;light&rdquo; task:<\/strong> Converting a color image to grayscale.<\/li>\n<li><strong>A &ldquo;heavy&rdquo; task:<\/strong> Applying a sharpen filter using a computationally expensive convolution matrix.<\/li>\n<\/ul>\n<p>Both operations rely heavily on mathematical conversions to change the images visually. By testing these two extremes, we can compare performance on a light task versus a heavy task.<\/p>\n<p>Before getting started, make sure you have the following installed:<\/p>\n<ul>\n<li>Node (used with <code>npx<\/code> to run the server): <a href=\"https:\/\/nodejs.org\/en\/download\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">download here<\/a><\/li>\n<li>Rust: <a href=\"https:\/\/rustup.rs\/\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">download here<\/a><\/li>\n<li>Wasm-pack (the WebAssembly build tool): run <code>cargo install wasm-pack<\/code> in your terminal<\/li>\n<li>An IDE with the Rust Analyzer extension (e.g., VS Code)<\/li>\n<\/ul>\n<h2>Building the Image Processor With Wasm and JavaScript<\/h2>\n<p>This project uses Rust, because it has the most mature WebAssembly ecosystem among compiled languages. Tools like <code>wasm-pack<\/code> and <code>wasm-bindgen<\/code> generate the JavaScript glue code and handle memory translation between Rust and JavaScript, allowing you to focus on application logic.<\/p>\n<p>From your main project folder, start the build process.<\/p>\n<p><strong>Create the project:<\/strong><\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/fa064e0b6396f148b86cb150f4adc0e6.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/fa064e0b6396f148b86cb150f4adc0e6\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n<p><strong>Open the working folder:<\/strong><\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/6e8c76f6afd9adea3bcf0a6dce75e885.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/6e8c76f6afd9adea3bcf0a6dce75e885\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n<p>After running these commands, you&rsquo;ll see the two key files:<\/p>\n<ul>\n<li><code>Cargo.toml<\/code>: Defines dependencies for the Rust project.<\/li>\n<li><code>src\/lib.rs<\/code>: Contains the application logic. WebAssembly projects use <code>lib.rs<\/code> because they compile to a library rather than a standalone executable.<\/li>\n<\/ul>\n<p><code>Cargo.toml<\/code> is the Rust project manifest (similar to <code>package.json<\/code>). Replace the default contents with the following:<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/40d59b0b47dc822be1c63f01678cb943.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/40d59b0b47dc822be1c63f01678cb943\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n<p><code>src\/lib.rs<\/code>&nbsp;contains the core image-processing logic.<\/p>\n<p>The <code>Light Task<\/code> iterates through pixel data, averages the red, green and blue values, and replaces them with a single grayscale value.<\/p>\n<p>The <code>Heavy Task<\/code> uses a convolution algorithm to calculate new pixel values based on neighboring pixels and applies a sharpen matrix using nested loops.<\/p>\n<p>The line <code>use wasm_bindgen::prelude::*;<\/code> imports macros that allow Rust code to interface with JavaScript.<\/p>\n<h2>Compiling Rust Code into WebAssembly<\/h2>\n<p>Run the following command to compile the Rust code into WebAssembly and generate the <code>\/pkg<\/code> directory:<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/c9511ac7517908f039938df10143bb88.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/c9511ac7517908f039938df10143bb88\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n<h2>Setting Up the HTML Frontend<\/h2>\n<p><code>index.html<\/code> acts as the frontend dashboard for the performance comparison.<\/p>\n<p>Users can upload an image and view results across four canvases. The page runs identical operations using WebAssembly and native JavaScript, for side-by-side timing comparisons.<\/p>\n<p>The <code>performance.now()<\/code> API provides high-precision timing in milliseconds.<br \/>\n<em>Note: Place <code>index.html<\/code> in the same directory as <code>Cargo.toml<\/code>.<br \/>\n<\/em><\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/b92783215d7ae5900b508799d893c458.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/b92783215d7ae5900b508799d893c458\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n<h2>How to Run the Performance Test<\/h2>\n<p>In the project directory, run <code>npx serve<\/code> and open <code>http:\/\/localhost:3000<\/code> in your browser.<\/p>\n<p>More complex operations show larger performance gaps between Wasm and JavaScript.<\/p>\n<p>For meaningful results, use a 4K image (approximately 3840 &times; 2160 pixels).<\/p>\n<p>Upload the image using the &ldquo;Choose File&rdquo; button and run the tests.<\/p>\n<h2>Performance Comparison Results<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-22813161\" src=\"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/408623df-tutorial-results-1024x912.png\" alt=\"\" width=\"1024\" height=\"912\" \/><\/p>\n<p>Across multiple runs, Wasm consistently outperformed JavaScript &mdash; about twice as fast for the light task and more than six times faster for the heavy task.<\/p>\n<p>This test covers a single image on one machine. At scale, or with more complex workloads like video processing, the performance gains become even more pronounced.<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/JessicaWachtel\/3e427f1207e1955370378e3edc08aa500.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/JessicaWachtel\/3e427f1207e1955370378e3edc08aa500\" class=\"ext-link\" rel=\"external nofollow\" onclick=\"this.target=&#039;_blank&#039;;\">Gist<\/a>.<\/noscript><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When we talk about WebAssembly&nbsp;(Wasm), we often describe it as &ldquo;near-native speed&rdquo; and &ldquo;faster than JavaScript.&rdquo; But what does that<\/p>\n","protected":false},"author":1977,"featured_media":22813184,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[13055,12903,12852],"tags":[10562],"coauthors":[12449],"class_list":["post-22813160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-rust","category-webassembly","tag-tutorial"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>WebAssembly vs. JavaScript: Testing Side-by-Side Performance - The New Stack<\/title>\n<meta name=\"description\" content=\"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WebAssembly vs. JavaScript: Testing Side-by-Side Performance\" \/>\n<meta property=\"og:description\" content=\"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"The New Stack\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/thenewstack\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-20T17:00:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jessica Wachtel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/jesstheswe\" \/>\n<meta name=\"twitter:site\" content=\"@thenewstack\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jessica Wachtel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/\"},\"author\":{\"name\":\"Jessica Wachtel\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#\\\/schema\\\/person\\\/915d2c49be023d324e6bed73d1c071c6\"},\"headline\":\"WebAssembly vs. JavaScript: Testing Side-by-Side Performance\",\"datePublished\":\"2026-01-20T17:00:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/\"},\"wordCount\":728,\"publisher\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2026\\\/01\\\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg\",\"keywords\":[\"Tutorial\"],\"articleSection\":[\"JavaScript\",\"Rust\",\"WebAssembly\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/\",\"url\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/\",\"name\":\"WebAssembly vs. JavaScript: Testing Side-by-Side Performance - The New Stack\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2026\\\/01\\\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg\",\"datePublished\":\"2026-01-20T17:00:19+00:00\",\"description\":\"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2026\\\/01\\\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2026\\\/01\\\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg\",\"width\":1280,\"height\":720,\"caption\":\"speed\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/webassembly-vs-javascript-testing-side-by-side-performance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thenewstack.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebAssembly vs. JavaScript: Testing Side-by-Side Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#website\",\"url\":\"https:\\\/\\\/thenewstack.io\\\/\",\"name\":\"The New Stack\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thenewstack.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#organization\",\"name\":\"The New Stack\",\"url\":\"https:\\\/\\\/thenewstack.io\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2021\\\/11\\\/a9fbec84-the-new-stack-logo-rgb-screen.png\",\"contentUrl\":\"https:\\\/\\\/cdn.thenewstack.io\\\/media\\\/2021\\\/11\\\/a9fbec84-the-new-stack-logo-rgb-screen.png\",\"width\":1032,\"height\":128,\"caption\":\"The New Stack\"},\"image\":{\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/thenewstack\",\"https:\\\/\\\/x.com\\\/thenewstack\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/#\\\/schema\\\/person\\\/915d2c49be023d324e6bed73d1c071c6\",\"name\":\"Jessica Wachtel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thenewstack.io\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/d55571c0-cropped-b09ca100-image1-96x96.jpgfc282b0fc28c5ed0cc11508b5d80a687\",\"url\":\"https:\\\/\\\/thenewstack.io\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/d55571c0-cropped-b09ca100-image1-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/thenewstack.io\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/d55571c0-cropped-b09ca100-image1-96x96.jpg\",\"caption\":\"Jessica Wachtel\"},\"description\":\"Jessica Wachtel is a developer marketing writer at InfluxData where she creates content that helps make the world of time series data more understandable and accessible. Jessica has a background in software development and technical journalism.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jessicawachtel\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/jesstheswe\"],\"url\":\"https:\\\/\\\/thenewstack.io\\\/author\\\/jessica-wachtel\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance - The New Stack","description":"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/","og_locale":"en_US","og_type":"article","og_title":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance","og_description":"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.","og_url":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/","og_site_name":"The New Stack","article_publisher":"https:\/\/www.facebook.com\/thenewstack","article_published_time":"2026-01-20T17:00:19+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg","type":"image\/jpeg"}],"author":"Jessica Wachtel","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/jesstheswe","twitter_site":"@thenewstack","twitter_misc":{"Written by":"Jessica Wachtel","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#article","isPartOf":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/"},"author":{"name":"Jessica Wachtel","@id":"https:\/\/thenewstack.io\/#\/schema\/person\/915d2c49be023d324e6bed73d1c071c6"},"headline":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance","datePublished":"2026-01-20T17:00:19+00:00","mainEntityOfPage":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/"},"wordCount":728,"publisher":{"@id":"https:\/\/thenewstack.io\/#organization"},"image":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg","keywords":["Tutorial"],"articleSection":["JavaScript","Rust","WebAssembly"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/","url":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/","name":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance - The New Stack","isPartOf":{"@id":"https:\/\/thenewstack.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#primaryimage"},"image":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg","datePublished":"2026-01-20T17:00:19+00:00","description":"How much faster is WebAssembly than JavaScript for heavy data processing? We do a side-by-side test using an image processor built with Rust.","breadcrumb":{"@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#primaryimage","url":"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg","contentUrl":"https:\/\/cdn.thenewstack.io\/media\/2026\/01\/5e959c93-paris-bilal-c1kpvqsgpcs-unsplashc.jpg","width":1280,"height":720,"caption":"speed"},{"@type":"BreadcrumbList","@id":"https:\/\/thenewstack.io\/webassembly-vs-javascript-testing-side-by-side-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thenewstack.io\/"},{"@type":"ListItem","position":2,"name":"WebAssembly vs. JavaScript: Testing Side-by-Side Performance"}]},{"@type":"WebSite","@id":"https:\/\/thenewstack.io\/#website","url":"https:\/\/thenewstack.io\/","name":"The New Stack","description":"","publisher":{"@id":"https:\/\/thenewstack.io\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thenewstack.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/thenewstack.io\/#organization","name":"The New Stack","url":"https:\/\/thenewstack.io\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thenewstack.io\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.thenewstack.io\/media\/2021\/11\/a9fbec84-the-new-stack-logo-rgb-screen.png","contentUrl":"https:\/\/cdn.thenewstack.io\/media\/2021\/11\/a9fbec84-the-new-stack-logo-rgb-screen.png","width":1032,"height":128,"caption":"The New Stack"},"image":{"@id":"https:\/\/thenewstack.io\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/thenewstack","https:\/\/x.com\/thenewstack"]},{"@type":"Person","@id":"https:\/\/thenewstack.io\/#\/schema\/person\/915d2c49be023d324e6bed73d1c071c6","name":"Jessica Wachtel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thenewstack.io\/wp-content\/uploads\/2023\/04\/d55571c0-cropped-b09ca100-image1-96x96.jpgfc282b0fc28c5ed0cc11508b5d80a687","url":"https:\/\/thenewstack.io\/wp-content\/uploads\/2023\/04\/d55571c0-cropped-b09ca100-image1-96x96.jpg","contentUrl":"https:\/\/thenewstack.io\/wp-content\/uploads\/2023\/04\/d55571c0-cropped-b09ca100-image1-96x96.jpg","caption":"Jessica Wachtel"},"description":"Jessica Wachtel is a developer marketing writer at InfluxData where she creates content that helps make the world of time series data more understandable and accessible. Jessica has a background in software development and technical journalism.","sameAs":["https:\/\/www.linkedin.com\/in\/jessicawachtel\/","https:\/\/x.com\/https:\/\/twitter.com\/jesstheswe"],"url":"https:\/\/thenewstack.io\/author\/jessica-wachtel\/"}]}},"_links":{"self":[{"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/posts\/22813160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/users\/1977"}],"replies":[{"embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/comments?post=22813160"}],"version-history":[{"count":9,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/posts\/22813160\/revisions"}],"predecessor-version":[{"id":22813195,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/posts\/22813160\/revisions\/22813195"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/media\/22813184"}],"wp:attachment":[{"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/media?parent=22813160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/categories?post=22813160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/tags?post=22813160"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/thenewstack.io\/wp-json\/wp\/v2\/coauthors?post=22813160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}