tbg10101 / dotnet-burst-comparison Goto Github PK
View Code? Open in Web Editor NEWBenchmarks to compare .NET and and Unity's Burst compiler.
License: MIT License
Benchmarks to compare .NET and and Unity's Burst compiler.
License: MIT License
The readme notes:
Each benchmark is run twice to let each runtime warm up. These results are from the second run. Smaller values are better.
However, modern .NET (.NET Core 2.1+) uses "Tiered Compilation" and that defaults to needing approx. 30 invocations and a delay of 1ms where no other Tier-0 code is jitted before methods can start being promoted to Tier-1
The very latest versions (.NET 7+) do have some support for OSR (On Stack Replacement) in which a hot loop may be replaced even when the rest of the method body hasn't been optimized and I expect that's what's happening for these benchmarks (as many do have loops that execute far more than 30 invocations). However, that is still going to miss some opts and pessimize the overall codegen.
In general, I'd recommend either:
TieredCompilation
(https://learn.microsoft.com/en-us/dotnet/core/runtime-config/compilation)Benchmark.NET
which will handle all of this for you, ensuring enough invocations occur and the relevant statistical analysis is done to find and account for noise, outlier results, etc.If you go with the first approach (disabling TC), it's worth noting that this also opts you out of things like DynamicPGO and optimizations that can only occur via a TieredJIT where you know some code has executed at least once.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.