Settings

Theme

Testing FFI Hot Loop Overhead – Java, C#, PHP, and Go

vancan1ty.com

3 points by vancan1ty 2 years ago · 1 comment

Reader

neonsunset 2 years ago

If you want to use 'dotnet run' to quickly launch a C# program, you need to use '-c Release' when evaluating performance, otherwise it will target Debug. With that, you won't need <Optimize>true</Optimize> in .csrpoj and will get proper optimizations.

Additionally, you really want to use proper benchmarking frameworks for each respective language (BenchmarkDotNet for C#). Both JVM and .NET JIT will go through multiple optimization tiers, Tier 0 -> Tier 1 in case of .NET 7 and Tier 0 -> Tier 0/1 instrumented for collection of PGO data -> Tier 1 PGO optimized in case of .NET 8 (Dynamic PGO is opt-in in .NET 7 and opt-out in .NET 8).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection