Skip to content

Performance

.NET / JS interop is fast because:

  • Marshaling does not use JSON serialization.
  • Compile-time or runtime code generation avoids reflection.
  • Use of shared memory and proxies minimizes data transfer.
  • Use of modern C# like struct, Span<T>, and stackalloc minimizes heap allocation & copying.

Performance comparison vs Edge.js

Warm JS to .NET calls are nearly twice as fast when compared to edge-js using that project's benchmark.

HTTPEdge.jsNode API .NETAOTJS (baseline)
Cold320393876193553621680
Warm200387544723

Numbers are microseconds. "Warm" is an average of 10000 .NET -> JS calls (passing a medium-size object).

Released under the MIT license