Following a different approach to better keep main-custom up to date with main by resetting and merging pending upstream PRs on top. Change-Id: I26c7a2c63b166715d01b50da0bd47aaf99aa3c1a Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/WebKit/JetStream/+/6976606 Reviewed-by: Victor Gomes <victorgomes@chromium.org>
1.8 KiB
.NET on WebAssembly
Tests .NET on WebAssembly. This benchmark tests operations on .NET implementation of String, JSON serialization, specifics of .NET exceptions and computation of a 3D scene using Mono Interpreter & AOT. Source code: .NET
The Benchmark
Consists of two halves:
-
BenchTasks, which is a series of micro-benchmarks:
- Exception throw/catch.
- JSON serialization/deserialization.
- String operations.
-
RayTracer
They run for different iterations/sizes, respectively for each half, depending on the variant (AOT/interpreter). The values to adjust the workloads are passed in from benchmark.js.
Build instructions
Download .NET SDK 9.0.3xx
Run build.sh script. It will install wasm-tools workload & build the benchmark code twice (for Mono interpreter & AOT).
To run the benchmark code on jsc, we are prepending import.meta.url ??= "" to dotnet.js.
Background on .NET / build output files
Mono AOT works in a "mixed mode". It is not able to compile all code patterns and in various scenarios it falls back to interpreter.
Because of that we are still loading managed dlls (all the other not-dotnet.native.wasm files).
Structure of the build output
dotnet.jsis entrypoint JavaScript with public API.dotnet.runtime.jsis internal implementation of JavaScript logic for .NET.dotnet.native.jsis emscripten module configured for .NET.dotnet.native.wasmis unmanaged code (Mono runtime + AOT compiled code).System.*.wasmis .NET BCL that has unused code trimmed away.dotnet.wasmis the benchmark code.