Home / Blog / NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than…
Tech News

NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT

NetWasm 0.10 cuts execution time across 2,213 benchmarks to 0.41 times Mono AOT on WASI through overhauled exception handling, SIMD, and division arithmetic.

By Dillip Chowdary • Nov 19, 2026 • Source: InfoQ

NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT
Image: InfoQ

At a glance

Product
NetWasm C# to WebAssembly compiler and runtime
Release series
0.10 optimization work spanning 0.10.1 to 0.10.8
Publication date
November 19, 2026
Performance ratio
0.41x Mono AOT time across 2,213 benchmark cases
Availability
Online playground and official GitHub repository
Known limits
Fixed 128-bit SIMD, slower Math.Pow and CopyBlock64

The NetWasm engineering team published a performance report detailing its 0.10 compiler release cycle, spanning versions 0.10.1 through 0.10.8, which speeds up ahead-of-time C# compilation to WebAssembly. According to InfoQ's report, the compiler reworked core execution paths including exception handling, bounds-check elimination, fixed-width SIMD instructions, and division operations. These cumulative changes allow NetWasm to execute a comprehensive 2,213-case benchmark suite in 0.41 times the execution time of Mono AOT's WASI build.

This report examines the underlying runtime mechanics, benchmark measurements, and open architectural limitations across the 0.10 release series. The findings are intended for .NET developers evaluating serverless WebAssembly runtimes, browser-based execution engines, and ahead-of-time compilation strategies. By contrasting execution times against both Mono AOT on WASI and desktop .NET 11 RC3, the data outlines where the independent toolchain leads and where platform limits remain.

01Shared exception handlers and frame cleanup

NetWasm operates as an ahead-of-time compiler and runtime that transforms intermediate language produced by Roslyn into standalone WebAssembly binaries. The architecture relies on an independent runtime and a CoreLib ported directly from .NET, positioning Mono AOT on WASI as its primary baseline. While an earlier garbage collector implementation gave NetWasm an advantage on allocation-heavy code, tight execution loops lagged, with a 100,000-integer quicksort taking 77.2 milliseconds compared to 58.0 milliseconds on Mono AOT.

Release 0.10.1 addressed substantial overhead introduced by the Wasmtime runtime around exception handling routines. Wasmtime previously inserted register save and restore instructions around any function capable of throwing or catching exceptions, preserving floating-point registers alongside general registers. Every method containing null checks, array bounds verifications, or checked-arithmetic operations suffered this saving overhead on every invocation.

To eliminate this per-call penalty, NetWasm redirected all exception throws through a unified shared function, leaving the catching handler responsible for releasing the relevant execution frames. Removing the repetitive register-preservation code from check-heavy operations directly decreased execution pauses across interactive code paths. In real-world interface benchmarks, this structural shift dropped measured user interface churn from 17.6 milliseconds down to 7.9 milliseconds.

02Loop inlining and bounds check elimination

Version 0.10.2 introduced deeper loop optimizations by inlining small straight-line methods, including tuple-swapping helpers, directly into calling loops. The compiler also eliminated redundant bounds checks whenever an operation repeated access against an identical array reference and index variable. These two compiler adjustments reduced the 100,000-integer quicksort execution time from 77.2 milliseconds down to 54.0 milliseconds, surpassing Mono AOT's 58.0-millisecond mark.

The developers validated loop behavior using DoomSharp, a software renderer for Doom written in C# that targets NetWasm. In this codebase, the compiler began transforming value-type accessor methods into direct field loads. Under the highest optimization level, small branching helper routines were also inlined directly inside hot rendering loops.

The combination of direct field access and loop inlining produced measurable throughput improvements in the rendering pipeline. Rendering a standard 120-frame benchmark sequence dropped from 3,595 milliseconds down to 1,934 milliseconds. By bypassing method invocation overhead and bounds verification during frame computation, NetWasm demonstrated that complex legacy C# rendering workloads could run efficiently on WebAssembly.

03WebAssembly SIMD lowering and partial differential equations

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Release 0.10.7 introduced native 128-bit WebAssembly SIMD support across standard .NET vector abstractions. Types including Vector128, Vector<T>, and PackedSimd now lower directly into 128-bit WebAssembly vector instructions. Element-wise array loops automatically unroll to process four or more elements in a single vector iteration, while preserving a scalar fallback for residual elements.

The compiler also gained the ability to hoist loop-invariant calls to the system Math library out of inner iteration loops. This optimization enabled vectorization of a computational solver for Burgers' equation, a fundamental partial differential equation in fluid mechanics. In initial benchmark runs, the vectorized solver execution time plummeted from 497 milliseconds down to 71 milliseconds.

The resulting fluid mechanics benchmark demonstrated the performance potential of native vector instructions on WebAssembly engines. Mono AOT required 186 milliseconds to execute the same Burgers' equation test on WASI, while desktop .NET completed the run in 93 milliseconds. NetWasm's 71-millisecond result marked a rare instance where the ahead-of-time WebAssembly compiler outpaced desktop runtime execution on identical mathematical hardware.

04Integer division optimization and benchmark comparisons

Release 0.10.8 optimized integer arithmetic by reusing division quotients during subsequent remainder operations. The compiler eliminated duplicate zero-divisor validation checks and avoided redundant overflow checks when dividing the minimum 32-bit integer by negative one. In trial-division benchmarking, these arithmetic adjustments reduced computation time from 1,376 milliseconds to 765 milliseconds, beating Mono AOT's 862-millisecond benchmark.

Across 2,213 benchmark cases evaluated at optimization level three with NetWasmGC, NetWasm achieved a geometric mean execution time of 0.41 relative to Mono AOT. Against desktop .NET 11 RC3 JIT, NetWasm's execution ratio reached 0.87, improving from 2.15 in version 0.10.6. By workload category, NetWasm's performance ratio compared to Mono AOT ranged from 0.34 on intrinsics to 0.81 on mathematical operations.

In the extended DoomSharp test suite, the fully optimized NetWasmGC runtime rendered 120 frames in 1,623 milliseconds. That result compared favorably against Mono AOT's 2,371 milliseconds, though desktop .NET 11 RC3 JIT completed the sequence in 1,053 milliseconds. The following table summarizes benchmark times across these optimization milestones:

Workload BenchmarkBaseline NetWasmNetWasm 0.10Mono AOT (WASI)Desktop .NET
Quicksort (100k items)77.2 ms54.0 ms (0.10.2)58.0 msNot reported
UI churn test17.6 ms7.9 ms (0.10.1)Not reportedNot reported
DoomSharp (120 frames)3,595 ms1,623 ms (0.10.8)2,371 ms1,053 ms
Burgers' equation solver497 ms71 ms (0.10.7)186 ms93 ms
Trial division test1,376 ms765 ms (0.10.8)862 msNot reported

05Host vector limits and runtime regressions

Despite general speedups, the NetWasm compiler team documented several performance deficits inherent to WebAssembly and current code generation paths. Desktop .NET remains roughly 3.1 times faster on dedicated vector workloads because desktop runtimes leverage native host SIMD widths rather than fixed 128-bit Wasm limits. Furthermore, Math.Pow runs 1.4 times slower than on Mono AOT, and CopyBlock64 lags by a factor of 3.3.

One specific workload, designated NewtR, regressed to 1.9 times slower than its performance in release 0.10.6. The developers attributed this slowdown to Wasmtime's register allocator, which maintained a value in a stack slot throughout loop execution rather than holding it in a register. Developers can test current builds in the online playground or inspect compilation guides in the project's official GitHub repository.

Note: Benchmark numbers were gathered on an Apple M1 Max running Wasmtime 49.0.3 using dotnet/performance cases, five NetWasm workloads, and 4 KiB function alignment to offset observed 15 percent code placement differences. Results outside this hardware and runtime configuration may differ.

Frequently asked questions

What is NetWasm?

NetWasm is an ahead-of-time compiler and runtime that compiles C# intermediate language produced by Roslyn into standalone WebAssembly binaries using its own runtime and ported CoreLib.

How does NetWasm 0.10 perform against Mono AOT?

Across 2,213 benchmark cases at O3 optimization, NetWasm 0.10.8 with NetWasmGC runs in 0.41 times the execution time of Mono AOT's WASI build as a geometric mean.

How did NetWasm improve SIMD performance in release 0.10.7?

NetWasm lowers Vector128, Vector , and PackedSimd into 128-bit WebAssembly instructions and unrolls element loops, allowing a fluid mechanics Burgers' equation solver to drop from 497 ms to 71 ms.

Which workloads show regressions or lag behind desktop .NET?

Desktop .NET remains 3.1 times faster on vector benchmarks due to host SIMD limits, Math.Pow is 1.4 times slower than Mono AOT, CopyBlock64 is 3.3 times slower, and the NewtR workload regressed to 1.9 times slower than in 0.10.6.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →