User Tools

Site Tools


notes:homebrew:6502_cc_performance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
notes:homebrew:6502_cc_performance [2023/06/09 18:05] – created asienotes:homebrew:6502_cc_performance [2023/09/27 17:03] (current) asie
Line 1: Line 1:
 ====== 6502 C compiler performance ====== ====== 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]])   * [[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.     * Tested compilers: cc65, gcc-6502, KickC, lcc65, llvm-mos, sdcc, vbcc.
     * This is the most comprehensive one. Focuses on typical benchmark samples.     * This is the most comprehensive one. Focuses on typical benchmark samples.
-    * They appear to use ''-O2'' as the size optimization flag for llvm-mos, which is odd - ''-Os'' gives much better results+    * 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]])+ 
 +  * [[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.     * 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.     * 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.)   * [[https://pubby.games/codegen.html|NESFab benchmark]] (Could not locate source.)
     * Tested compilers: cc65, gcc-6502, KickC, llvm-mos, vbcc.     * 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.     * No methodology; in addition, NESFab is more akin to a high-level assembler than a C compiler.
  
notes/homebrew/6502_cc_performance.1686333903.txt.gz · Last modified: 2023/06/09 18:05 by asie