====== 6502 C compiler performance ====== Sorted in order of personal preference. Note that picking your tool of choice by exact numbers is silly. A 1% gain here or there will not matter in a real-world scenario - stability and featuresets will matter much more. However, these are good in establishing a general ballpark of performance. * [[https://raxiss.com/compiler-benchmark/bench.html|Oric-1 compiler benchmark]] ([[https://github.com/iss000/oricCompilerBenchmark|Source]]) * Tested compilers: cc65, gcc-6502, KickC, lcc65, llvm-mos, sdcc, vbcc. * This is the most comprehensive one. Focuses on typical benchmark samples. * Miscompilations should not be taken at face value; they tend to [[https://github.com/iss000/oricCompilerBenchmark/issues/7|modify runtime/standard library code]] to fit their build system. * [[https://sgadrat.itch.io/super-tilt-bro/devlog/219534/benchmark-c-compilers-for-the-6502-cpu|sgadrat's Super Tilt Bro benchmark]] ([[https://github.com/sgadrat/6502-compilers-bench|Source]]) * Tested compilers: cc65, gcc-6502, KickC, llvm-mos (via pull request), vbcc. * Seems to mostly be based on real-world/tutorial cc65 code snippets. Some have optimized ASM to compare against. * [[https://gglabs.us/node/2293|GGLabs benchmark]] (Source on website) * Tested compilers: cc65, gcc-6502, KickC, sdcc, vbcc. * Based on typical benchmark samples. * [[https://pubby.games/codegen.html|NESFab benchmark]] (Could not locate source.) * Tested compilers: cc65, gcc-6502, KickC, llvm-mos, vbcc. * No methodology; in addition, NESFab is more akin to a high-level assembler than a C compiler.