• This repository has been archived on 31/Jan/2024
  • Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    C#
  • License
    Do What The F*ck ...
  • Created over 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Benchmarking Burst/IL2CPP against GCC/Clang machine code

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