Compiler Comparisons
Micro Benchmarks
How rg-cc compares to other 680x0 C compilers on Atari ST cycle counts and executable size.
Overall Results (Shared Tests)
Head-to-head totals across the 504 tests that compile and pass on all six compilers (8 MHz 68000 body cycles, crt0 excluded), plus total stripped .TOS size across the 108 standalone single-file subset that link without external harness runtime.
| Compiler | Total Cycles (504) | Total Size (108 standalone) | Win / Tie (504) |
|---|---|---|---|
| rg-cc | 212,728,470 | 8,247 B | 73% |
| Pure C | 448,755,836 | 17,971 B | 17% |
| GCC 15 | 777,523,676 | 8,520 B | 33% |
| AHCC | 830,994,346 | 15,791 B | 0% |
| VBCC | 891,105,456 | 10,406 B | 5% |
| Clang 22 | 1,108,778,190 | 8,627 B | 30% |
Ties credit all joint winners. Full-suite pass rates (1,217 tests): rg-cc 1,217 (100%) · GCC 15 1,168 (96%) · Clang 22 1,108 (91%) · VBCC 895 (74%) · AHCC 618 (51%) · Pure C 568 (47%).
Speed: Median Execution Cycles (Lower is Better)
Median per-test cycle ratio of each compiler at its fastest mode against rg-cc -O3 on shared passing tests (normalised to rg-cc = 1.00×; shorter bar = fewer cycles).
Every test is weighted equally using the median per-test ratio (aggregate total cycles across the suite are 2.1×–4.5× higher on other compilers). Pure C in 16-bit parity mode (rg-cc -O3 --mshort --abi=purec) has a 93% win/tie rate over 563 tests.
Size: Median Final Executable Footprint (Lower is Better)
Median stripped Atari .TOS executable size across the 108 standalone tests (the subset of the 504 shared passing tests that link with only the minimal startup/exit runtime; shorter bar = smaller binary).
Symbol tables stripped across all 6 compilers, linked with the minimal startup/exit runtime only (no libc_stub). When linking the full libc_stub monolithically across the broader suite, rg-cc averages 61 KB vs 75 KB (GCC 15), 80 KB (Clang 22), and 148 KB (VBCC).
Workload Breakdown
rg-cc -O3 win/tie rate across every functional area of the 1,217-test suite.
| Category | Tests | vs GCC 15 | vs Clang 22 | vs VBCC | vs AHCC | vs Pure C |
|---|---|---|---|---|---|---|
| C99 Conformance | 219 | 100% | 99% | 100% | 100% | 95% |
| GCC Torture Suite | 370 | 95% | 98% | 100% | 100% | 89% |
| Optimiser & C99 Probes | 306 | 81% | 86% | 100% | 100% | 93% |
| Arithmetic & Soft-Float | 111 | 83% | 90% | 99% | 100% | 96% |
| 68k Addressing & Loops | 61 | 77% | 74% | 100% | 98% | 92% |
| Control Flow & ABI | 62 | 68% | 78% | 100% | 100% | 99% |
| Memory & Aggregates | 57 | 79% | 77% | 100% | 100% | 98% |
| Atari ST Kernels | 31 | 71% | 70% | 100% | 100% | 100% |
Across all tests in each category; rival compile, link, or runtime failures count as wins for rg-cc.
GCC Torture Suite (Sample)
Compiler edge cases from the GCC C99 torture suite.
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
torture_header_ctype_classification |
1,904,582 | 2,400,838 | 2,671,178 | 3,333,520 | 3,054,612 | 2,449,402 |
torture_if_defined_and_expansion |
50,370 | 63,562 | 70,722 | 89,366 | 62,210 | 48,134 |
torture_bswap_rotations |
46,232 | 54,130 | 61,038 | 84,316 | 57,436 | 43,804 |
torture_block_scope_static_and_extern |
41,296 | 50,918 | 55,988 | 68,848 | 51,722 | 41,340 |
torture_continue_in_while_switch |
13,864 | 15,216 | 16,076 | 26,952 | 18,272 | 15,974 |
torture_recursion_fib |
7,992 | 7,220 | 8,724 | 14,230 | 11,834 | 9,736 |
torture_divmod_const |
1,548 | 2,620 | 2,766 | 7,252 | 5,606 | 4,006 |
| Total (7 Tests) | 2,065,884 | 2,594,504 | 2,886,492 | 3,624,484 | 3,261,692 | 2,612,396 |
68000 Loops & Addressing
Countdown loops, pointer walking, and array indexing.
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
dbra_trip_exceeds_word |
22,018,658 | 25,129,638 | 40,510,632 | 27,989,106 | 32,536,446 | 22,837,474 |
ptr_arith_u32 |
66,832 | 81,154 | 87,960 | 157,600 | 82,504 | 69,578 |
ptr_arith_u16 |
66,848 | 81,138 | 87,960 | 107,518 | 82,652 | 69,386 |
ptr_to_ptr |
14,690 | 17,252 | 20,716 | 27,532 | 17,994 | 14,048 |
loop_reverse_up_counter |
13,206 | 17,676 | 18,354 | 27,370 | 32,678 | 19,796 |
dbra_narrow_fixed |
1,294 | 2,542 | 1,454 | 2,750 | 3,358 | 2,170 |
ptr_spill |
264 | 480 | 156 | 2,298 | 3,646 | 2,238 |
dbra_param_simple |
60 | 44 | 44 | 262 | 310 | 238 |
| Total (8 Tests) | 22,181,852 | 25,329,924 | 40,727,276 | 28,314,436 | 32,759,588 | 23,014,928 |
64-bit & Integer Divide Arithmetic
64-bit integer maths and integer division (AHCC and Pure C do not support C99 long long).
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
i64_const_div_helper |
2,567,450 | 4,320,940 | 3,301,484 | 34,508,596 | — | — |
div_signed_pow2_mixed |
161,284 | 199,448 | 219,420 | 263,142 | — | — |
i64_mul_loop_sink |
150,192 | 144,342 | 284,414 | 410,150 | — | — |
i64_var_shift |
5,832 | 7,108 | 12,796 | 17,198 | — | — |
i64_const_shift |
3,114 | 2,472 | 3,490 | 28,994 | — | — |
i64_udiv_pow2 |
1,930 | 2,348 | 2,220 | 12,274 | — | — |
sdiv_pow2_negdiv |
616 | 510 | 1,340 | 2,856 | 2,412 | 2,404 |
| Total (7 Tests) | 2,890,418 | 4,677,168 | 3,825,164 | 35,243,210 | — | — |
Control Flow, Structs & ABI
Switch statements, struct copies, and function calls.
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
switch_dispatch_diff |
106,678 | 125,980 | 139,348 | 210,318 | 206,066 | 147,608 |
switch_arm_byte_scatter_keys |
69,876 | 86,156 | 94,804 | 108,812 | 83,514 | 70,080 |
switch_cluster |
27,766 | 39,338 | 30,032 | 69,052 | 63,792 | 43,986 |
switch_sparse_neg |
2,392 | 2,864 | 2,158 | 5,128 | 5,116 | 3,264 |
struct_scan_dispatch |
516 | 390 | 322 | 4,420 | 4,558 | 1,020 |
arg_layers_s32 |
140 | 124 | 212 | 1,064 | 688 | 940 |
arg_layers_s16 |
104 | 124 | 364 | 1,086 | 584 | 788 |
if_ladder_dense |
4,566 | 4,706 | 6,176 | 14,150 | 15,854 | 9,580 |
| Total (8 Tests) | 212,038 | 259,682 | 273,416 | 414,030 | 380,172 | 277,266 |
Atari ST Kernels (Sample)
Atari ST hardware, sprite, and library routines.
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
kernel_bitplane_unpack_u32 |
19,381,164 | 29,824,626 | 135,060,120 | 49,068,750 | 123,296,380 | 33,400,442 |
kernel_bitplane_unpack_u16 |
16,069,712 | 21,244,442 | 81,505,566 | 38,925,958 | 108,356,636 | 26,184,858 |
kernel_fixed_point_s16 |
12,117,992 | 8,292,800 | 43,113,458 | 33,825,040 | 58,088,572 | 32,896,294 |
kernel_audio_mix_s32 |
9,744,772 | 10,365,004 | 28,538,112 | 23,958,132 | 44,601,476 | 20,373,206 |
kernel_aabb_collision_s16 |
8,854,722 | 6,341,878 | 19,786,936 | 18,052,852 | 44,886,290 | 13,832,752 |
godlib_static_local |
15,296 | 15,722 | 17,534 | 25,966 | 20,570 | 16,050 |
godlib_fnptr_3args |
50 | 56 | 56 | 1,588 | 1,664 | 820 |
| Total (7 Tests) | 66,183,708 | 76,084,528 | 308,021,782 | 163,858,286 | 379,251,588 | 126,704,422 |
Atari ST Engine Kernels
Fixed-point maths, audio mixing, tilemap indexing, collision checks, and bitplane unpacking.
| Test | rg-cc | GCC 15 | Clang 22 | VBCC | AHCC | Pure C |
|---|---|---|---|---|---|---|
kernel_fixed_point_s16 |
12,589,328 | 8,292,800 | 43,113,458 | 33,825,040 | 58,088,572 | 32,896,294 |
kernel_audio_mix_s32 |
9,867,264 | 10,365,004 | 28,538,112 | 24,608,504 | 44,601,476 | 20,373,206 |
kernel_tilemap_index_s32 |
6,260,412 | 6,153,932 | mismatch | 32,381,836 | 39,330,988 | 11,164,038 |
kernel_bitplane_unpack_u32 |
19,381,164 | 29,824,626 | 140,837,306 | 49,068,750 | 123,296,380 | 33,400,442 |
kernel_bitplane_unpack_u16 |
16,069,712 | 21,244,442 | 83,264,528 | 38,925,958 | 108,356,636 | 26,184,858 |
kernel_aabb_collision_s32 |
8,592,590 | 7,311,224 | 23,054,088 | 20,381,218 | 43,820,830 | 15,302,058 |
kernel_aabb_collision_s16 |
8,867,720 | 6,341,878 | 19,786,936 | 18,052,852 | 44,886,290 | 13,832,752 |
kernel_fixed_point_s32 |
12,378,768 | 9,610,816 | 46,355,994 | 34,566,516 | 63,487,148 | 34,058,018 |
kernel_audio_mix_s16 |
8,526,102 | 9,153,644 | 12,779,718 | 23,069,268 | 44,040,218 | 9,415,050 |
kernel_tilemap_index_s16 |
6,448,412 | 5,122,954 | 6,363,648 | 12,231,124 | 39,330,988 | 8,348,022 |
| Total (10 Kernels) | 108,981,472 | 113,421,320 | — | 287,111,066 | 604,239,528 | 204,974,738 |