Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

nxrighthere/BurstBenchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BurstBenchmarks

I was curious how well Burst/IL2CPP optimizes C# code against GCC/Clang with C, so I've ported five famous benchmarks, plus a raytracer, a minified flocking simulation, particle kinematics, a stream cipher, a hashing algorithm, and radix sort, with different workloads and made them identical between the two languages. C code compiled with all possible optimizations using -DNDEBUG -Ofast -march=native -flto compiler options. Benchmarks were done on Windows 10 w/ Ryzen 5 1400 using standalone build. Mono JIT and RyuJIT are included for fun.

The logic acquires one core of the CPU from startup to the end. Do not perform any actions while the benchmarks are running and wait until the process is complete.

This project is donated to Unity's Burst compiler team as a performance test-suite to identify inconsistencies in the generated machine code in comparison to other compilers.

Burst 1.2.3
GCC 9.2.0
Clang (LLVM 9.0.1)
IL2CPP and Mono JIT (Unity 2019.3.2f1)
RyuJIT (.NET Core 3.1.101)

Integer math

Fibonacci Sieve of Eratosthenes Arcfour Seahash Radix

Single-precision math

Mandelbrot Pixar Raytracer Fireflies Flocking Polynomials Particle Kinematics

Double-precision math

NBody

Discussion

You can find the discussion in the thread on Unity forums.

Supporters

These wonderful people make open-source better:

supporters

This project is sponsored by JetBrains.
JetBrains