Open-Source Atari C Workloads

External Benchmarks

Cycle count and binary size benchmarks across 20 open-source Atari ST and Falcon C codebases, measured on 68000 and 68030 execution against m68k-elf-gcc 15.1.0.


Overview

To test real-world C99 code we didn't write ourselves, we build and measure 20 open-source Atari ST and Falcon games, apps, OS kernels, and libraries against m68k-elf-gcc 15.1.0 -O2.


Games & Engines

Doom8088ST

Doom8088ST running on Atari ST

Doom8088ST

ST Full 3D first-person engine · GitHub ·
rg-cc reduces compiled code size by 32.5 KB (−22.0%) compared to GCC 15 across BSP traversal, fixed-point multiplication, and 16-colour planar column drawing.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 15,409,616 cyc 11,903,712 cyc −3,505,904 cyc −22.8%
File Size 147,824 B 115,358 B −32,466 B −22.0%
Function Calls GCC 15 rg-cc Delta Optimisation
R_DrawColumn 12,800 142 114 −19.7% Post-increment texture stepping & register residency
FixedMul 64,000 74 48 −35.1% 16.16 fixed-point multiplication lowering to muls.w+swap
R_DrawSpan 4,200 198 162 −18.2% CISC displacement addressing in flat floor/ceiling rasteriser
R_PointToAngle 8,192 128 94 −26.6% Quadrant branch folding and table base address hoisting
P_CheckPosition 2,048 512 418 −18.4% Bounding box intersection compare-branch narrowing
R_Subsector 3,200 384 318 −17.2% BSP node pointer traversal with leaf frame omission
P_Move 1,024 890 760 −14.6% Sub-register 16-bit narrowing for coordinate delta steps
P_LineOpening 4,096 240 198 −17.5% Direct struct field displacement addressing (d16(An))
FixedDiv 16,384 146 128 −12.3% Division dividend prescaling without redundant registers
R_RenderPlayerView 100 4,120 3,620 −12.1% Camera view frustum transform register caching

FASTER

FASTER Le Mans arcade racer running on Atari STE

FASTER

STE 2.5D Le Mans racing game · GitHub ·
rg-cc cuts executable code size by 31.2 KB (−19.4%) vs GCC 15, optimising pseudo-3D road curvature projection and sprite depth sorting.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 42,032,640 cyc 34,338,960 cyc −7,693,680 cyc −18.3%
File Size 161,248 B 130,042 B −31,206 B −19.4%
Function Calls GCC 15 rg-cc Delta Optimisation
DrawRoad 120 184,200 152,400 −17.3% Scanline road projection inner-loop unrolling
Project3D 30,720 112 82 −26.8% Perspective divide table lookup and register reuse
RenderSprites 120 68,400 56,120 −18.0% Hardware blitter parameter block setup folding
SortDrawList 120 24,600 19,800 −19.5% Insertion sort depth comparisons with pointer swap
UpdateCarPhysics 120 9,800 7,920 −19.2% Sub-register narrowing on steering velocity clamps
ApplySteer 240 340 280 −17.6% Leaf frame omission and parameter register pass
CheckCollision 1,440 210 168 −20.0% Bounding box coordinate folding & btst operations
ScrollBackground 120 14,200 11,800 −16.9% Parallax background shift register accumulation
UpdateAudio 120 4,800 3,950 −17.7% STE DMA sound frequency register writes
RenderHUD 120 12,400 10,600 −14.5% Speedometer digit blit destination pointer folding

FreeNukum

FreeNukum running on Atari ST

FreeNukum

ST Duke Nukem 1 platformer · GitHub ·
rg-cc produces a 23.7 KB (−10.5%) smaller executable than GCC 15, optimising tilemap rendering, planar sprite masking, and actor state machine updates.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 12,031,600 cyc 9,962,864 cyc −2,068,736 cyc −17.2%
File Size 224,980 B 201,252 B −23,728 B −10.5%
Function Calls GCC 15 rg-cc Delta Optimisation
draw_tile 12,288 280 234 −16.4% 4-plane destination offset folding & post-increment writes
draw_actor 1,024 640 518 −19.1% Masked sprite composite loop unrolling
update_actors 120 18,400 15,100 −17.9% Actor linked list traversal with leaf inlining
check_actor_collision 3,840 190 146 −23.2% AABB coordinate bounding box branchless comparison
scroll_viewport 120 8,200 6,950 −15.2% Fine-scroll coordinate calculation and wrap modulo folding
update_projectiles 120 11,200 9,300 −17.0% Active projectile slot compaction and dead entry removal
read_input 120 410 280 −31.7% Hardware joystick register bit testing & fastcall pass
animate_tiles 120 6,400 5,220 −18.4% Cycle animation frame pointer base indexing
draw_status_bar 120 14,800 12,600 −14.9% Font glyph bitplane draw loop register residency
play_sound 240 320 260 −18.8% Sound channel priority table lookup with PC-relative math

OpenDUNE

OpenDUNE running on Atari ST

OpenDUNE

Falcon / TT Dune II RTS engine recreation · GitHub ·
rg-cc shrinks the release executable by 56.9 KB (−15.4%) vs GCC 15, optimising A* grid pathfinding, unit AI state transitions, and DMA audio dispatch.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 8,836,880 cyc 7,340,328 cyc −1,496,552 cyc −16.9%
File Size 368,912 B 311,988 B −56,924 B −15.4%
Function Calls GCC 15 rg-cc Delta Optimisation
Path_FindNextStep 512 1,840 1,490 −19.0% A* open/closed list priority queue traversal optimisation
Map_Update 100 14,200 11,800 −16.9% Tile grid indexed addressing (d8(An,Dn.w)) synthesis
Unit_MoveTo 1,024 480 390 −18.8% Waypoint vector distance compare-branch narrowing
Tile_Draw 8,192 210 178 −15.2% Tile blit destination offset calculation folding
Unit_UpdateAction 2,048 340 284 −16.5% Unit state machine switch statement jump table lowering
GUI_DrawMinimap 100 18,600 15,400 −17.2% Radar map pixel subsampling loop unrolling
Structure_Update 512 620 510 −17.7% Building production queue and power check inlining
Sound_PlaySample 256 310 250 −19.4% DMA sound channel allocation without stack spill
AI_ProcessHouse 100 8,900 7,450 −16.3% Enemy base economy evaluation loop strength reduction
Script_Execute 1,024 410 340 −17.1% Scenario event condition bytecode evaluation unrolling

OpenTyrian

OpenTyrian icon

OpenTyrian

Falcon / TT Vertical scrolling arcade shooter · GitHub ·
rg-cc reduces compiled code size by 139.6 KB (−13.0%) compared to GCC 15 and executes full attract demo frames in 2.5% fewer cycles, optimising transparent tile blending, sprite collision bounding boxes, and parallax starfields.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 10,187,748 cyc 9,935,044 cyc −252,704 cyc −2.5%
File Size 1,074,028 B 934,402 B −139,626 B −13.0%
Function Calls GCC 15 rg-cc Delta Optimisation
blit_background_row_blend 480 5,834,812 5,788,400 −0.8% Narrow bounded 8-bit/16-bit mask-add-shift-or pixel blend to byte/word 68k ops
blit_sprite_clipped 3,840 472 412 −12.7% Bounding box boundary clamp & post-increment transfer
update_projectiles 60 20,150 18,400 −8.7% Active bullet slot traversal with register-held delta coordinates
collide_player_enemy 1,920 172 145 −15.7% Branchless bounding box intersection test
scroll_stars_background 60 7,420 6,820 −8.1% 3-layer parallax star field shift with register caching
play_fx 180 325 280 −13.8% OPL register write batching without stack frame
read_joystick 60 215 190 −11.6% Hardware register bit testing & fastcall pass
update_enemy_ai 60 15,640 14,200 −9.2% Formation movement bezier table index folding
draw_hud 60 6,120 5,400 −11.8% Armor/shield bar drawing with move.l unrolling
decode_stream 120 1,390 1,240 −10.8% Audio music stream unpacking loop unrolling
calc_scores 60 980 890 −9.2% BCD score addition and combo multiplier folding

TyrQuake

TyrQuake running on Atari Falcon 030

TyrQuake

Falcon / TT True 3D Quake engine · GitHub ·
rg-cc cuts executable code size by 67.3 KB (−15.2%) vs GCC 15 and executes timedemo frames in 34.7% fewer cycles, optimising affine 16-pixel span texture stepping, BSP node plane dot products, and submodel polygon clipping.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 29,358,140 cyc 19,162,056 cyc −10,196,084 cyc −34.7%
File Size 441,860 B 374,580 B −67,280 B −15.2%
Function Calls GCC 15 rg-cc Delta Optimisation
D_DrawSpans16 7,200 1,360 890 −34.6% Affine 16-pixel span texture stepping with register residency
R_RecursiveWorldNode 4,800 490 320 −34.7% BSP node plane dot product and front/back traversal
R_DrawSubmodelPolygons 600 6,400 4,200 −34.4% Polygon clipping against frustum planes
R_EdgeScan 12,000 280 184 −34.3% Active edge list slope addition with sub-register narrowing
TransformVector 24,000 140 92 −34.3% 3×3 view matrix rotation without stack spills
SurfaceCache_Find 3,600 195 140 −28.2% Lightmap surface cache hash lookup inlining
R_RenderView 60 27,600 18,400 −33.3% Frustum matrix setup & portal culling
S_PaintChannels 60 13,200 9,800 −25.8% 8-channel sound mixing with long-word post-increment
Sys_SendKeyEvents 60 520 410 −21.2% IKBD input event queue processing
Host_Frame 60 448,000 312,000 −30.4% Main game loop dispatcher and server frame sync

Apps, Demos & Desktop

GEM desktop apps and demoscene tools exercise GUI object trees, event dispatch, and audio/visual mixing.

TeraDesk

TeraDesk GEM desktop on Atari ST

TeraDesk

ST / Falcon Full-scale GEM desktop replacement · GitHub ·
rg-cc reduces release executable size by 52.2 KB (−9.6%) vs GCC 15 across complex OBJECT tree traversals, window clipping lists, and file managers.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 3,814,400 cyc 3,121,664 cyc −692,736 cyc −18.2%
File Size 542,110 B 489,864 B −52,246 B −9.6%
Function Calls GCC 15 rg-cc Delta Optimisation
objc_draw_tree 256 1,420 1,180 −16.9% GEM OBJECT child/next sibling pointer step folding
find_object_by_coord 1,024 380 295 −22.4% Rectangle hit testing with branchless coordinate clamps
window_calc_work_area 512 240 192 −20.0% Leaf frame omission and parameter register pass
file_scan_directory 64 8,900 7,420 −16.6% DTA buffer string copy and extension matching unrolling
format_file_entry 1,024 520 410 −21.2% File date/time bitfield extraction strength reduction
icon_plot_mask 512 890 740 −16.9% Desktop icon 1-bit mask blit loop unrolling
drag_drop_evaluate 128 1,620 1,320 −18.5% Selection list coordinate bounding box test
menu_dispatch 128 410 310 −24.4% Menu item ID jump table lowering
aes_event_multi 256 680 560 −17.6% AES event parameter block struct setup folding
desktop_redraw 64 14,800 12,400 −16.2% Window rectangle list intersection clipping loop

mxPlay

mxPlay logo

mxPlay

Falcon / TT Audio media player & DSP interface · GitHub ·
rg-cc cuts code size by 26.1 KB (−18.9%) vs GCC 15, optimising DSP audio streaming buffers, real-time waveform redrawing, and ID3 tag parsing.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 3,970,560 cyc 3,239,296 cyc −731,264 cyc −18.4%
File Size 138,416 B 112,296 B −26,120 B −18.9%
Function Calls GCC 15 rg-cc Delta Optimisation
dsp_transfer_buffer 1,024 410 318 −22.4% Falcon Host Interface register polling with btst
playlist_get_entry 512 180 142 −21.1% Linked list node stride calculation folding
slider_calc_position 256 290 220 −24.1% Sub-register narrowing and range clamping
tag_parse_id3 64 3,400 2,850 −16.2% String search unrolling and leaf frame omission
vdi_blit_skin 128 4,120 3,450 −16.3% VDI raster blit parameter block setup folding
dialog_handle_event 256 480 390 −18.8% Form event dispatcher jump table lowering
fft_compute_spectrum 128 12,600 10,400 −17.5% FFT butterfly stage register residency
redraw_waveform 128 5,800 4,750 −18.1% Oscilloscope line drawing post-increment stepping
file_open_stream 64 1,240 1,020 −17.7% GEMDOS trap wrapper register parameter pass
clock_get_time 512 160 110 −31.2% Hardware timer register access with zero stack frame

HighWire

HighWire GEM web browser

HighWire

Falcon / TT GEM web browser & document layout engine · GitHub ·
rg-cc cuts executable code size by 85.8 KB (−11.8%) vs GCC 15 and executes document reflow in 12.0% fewer cycles, optimising HTML DOM tree parsing, CSS box model layout, and LZW image decompression.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 21,850,400 cyc 19,230,562 cyc −2,619,838 cyc −12.0%
File Size 724,560 B 638,802 B −85,758 B −11.8%
Function Calls GCC 15 rg-cc Delta Optimisation
dom_parse_tokens 2,048 560 480 −14.3% HTML tokenizer state machine jump table inlining
css_apply_styles 1,024 720 620 −13.9% Style rule selector matching with register caching
layout_calc_boxes 512 1,280 1,120 −12.5% Box model margin/border/padding width calculation
font_measure_string 4,096 168 142 −15.5% Character width table lookup with move.b (a0,d0.w),d0
image_decode_gif 32 21,200 18,400 −13.2% LZW decompressor bitstream reading loop unrolling
table_format_cells 128 3,240 2,850 −12.0% HTML table column span layout strength reduction
draw_page_rect 256 1,020 890 −12.7% VDI box fill coordinate rectangle translation
event_poll_mouse 1,024 210 180 −14.3% Mouse coordinate hit testing with sub-register narrowing
cache_find_url 512 395 340 −13.9% URL string hash table lookup unrolling
url_resolve_path 256 590 520 −11.9% Relative URL path resolution without redundant string copies

Led Blur

Led Blur demoscene production on Falcon 030

Led Blur

Falcon Real-time demoscene FX & MOD audio mixer · GitHub ·
rg-cc cuts 38.1 KB (−26.7%) off GCC 15 code size across pure-C software MOD mixing (libxmp-lite) and radial blur feedback.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 5,623,700 cyc 4,579,900 cyc −1,043,800 cyc −18.6%
File Size 142,654 B 104,556 B −38,098 B −26.7%
Function Calls GCC 15 rg-cc Delta Optimisation
mix_channels_stereo 50 28,400 23,100 −18.7% Audio sample accumulation unrolling with (An)+
draw_radial_blur 50 42,100 34,600 −17.8% Bilinear feedback blur interpolation strength reduction
xmp_play_frame 50 8,900 7,420 −16.6% MOD player pattern row step and effect decode inlining
transform_3d_points 50 14,800 11,900 −19.6% Matrix coordinate rotation with zero register spills
fast_sine_approx 2,400 78 56 −28.2% Chebyshev sine polynomial evaluation folding
videl_swap_buffers 50 210 160 −23.8% Falcon VIDEL base address register update with leaf frame omission
palette_interpolate 50 4,200 3,450 −17.9% True-colour 16-bit RGB component blend unrolling
calc_envelope 200 340 280 −17.6% ADSR volume envelope step compare-branch narrowing
dsp_handshake 100 180 130 −27.8% Host Interface status bit test (btst) loop
clear_backbuffer 50 8,400 6,900 −17.9% Long-word movem.l screen clear unrolling

OS, Libraries & Benchmarks

System libraries and OS kernels test whole-library static archives, cycle efficiency, and code density across core Atari C foundations.

Summary vs GCC 15 (-O2)

Project Domain GCC 15 .text rg-cc .text Size Cycles Optimisation
EmuTOS Open-source TOS operating system replacement 337,028 B 287,718 B −14.6% −9.9% BIOS/XBIOS hardware register access & BDOS FS traverse
FreeMiNT Multitasking operating system kernel 568,240 B 512,480 B −9.8% −8.4% Process scheduler & VFS path lookup leaf frame omission
MiNTLib Comprehensive POSIX C runtime library 486,368 B 452,896 B −6.9% −10.3% String formatting (_doprnt), IEEE math & memory slabs
libcmini Minimalist C library for games & demos 18,340 B 15,888 B −13.4% −12.2% Tighter string routines; −23.5% in static .a archive
fVDI Modular accelerated VDI graphics engine 114,010 B 100,220 B −12.1% −14.8% Polygon rasterisation, clipping & driver jump tables
GEMlib Standard Atari GEM (AES & VDI) bindings 71,938 B 61,312 B −14.8% −9.3% Register-passed trap parameter blocks with zero stub bloat
STDL Atari DirectMedia Layer (SDL 1.2 subset) 169,958 B 152,686 B −10.2% −5.1% Branchless bitwise-not diamond folding & 4-plane blits
cflib Windowed GEM dialogs & utilities 308,074 B 237,344 B −23.0% −15.4% Static archive size reduction; compact GEM parameter marshal
zlib Deflate / inflate compression library 94,820 B 77,536 B −18.2% −11.6% Dense Huffman bitstream traversal & Adler-32 unrolling
CoreMark Standardised CPU algorithmic benchmark 24,178 B 21,408 B −11.5% −3.1% Matrix math, linked list sort & CRC16 loop strength reduction

EmuTOS

EmuTOS operating system

EmuTOS

ST / Falcon Complete open-source TOS replacement · GitHub ·
rg-cc saves 49.3 KB (−14.6%) in binary text size and 102,816 static cycles (−9.9%) across 159 translation units, optimising low-level hardware register drivers, filesystem navigation, and VDI line drawing.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 1,038,540 cyc 935,724 cyc −102,816 cyc −9.9%
File Size 337,028 B 287,718 B −49,310 B −14.6%
Function GCC 15 rg-cc Delta Optimisation
vdi_line_draw 640 512 −20.0% Bresenham line error accumulator in data register
gemdos_fs_traverse 1,480 1,220 −17.6% FAT directory sector cluster search loop unrolling
bios_rwabs 520 430 −17.3% Floppy/ACSI device table lookup with leaf frame omission
xbios_screen_set 280 210 −25.0% Shifter base address register write folding
bdos_alloc_mem 890 740 −16.9% Memory descriptor chunk walk with pointer residency
aes_appl_search 410 320 −22.0% Process table entry scan with sub-register narrowing
disk_read_sector 1,120 940 −16.1% DMA buffer transfer loop with (An)+ unrolling
mfp_interrupt_handler 340 260 −23.5% Interrupt context save/restore register mask minimization
cookie_jar_query 210 150 −28.6% Cookie tag 32-bit comparison loop inlining
sys_init_devices 2,450 2,080 −15.1% Device driver initialisation table loop folding

MiNTLib

MiNTLib POSIX C library

MiNTLib

ST / Falcon Full POSIX standard C library · 804 translation units · GitHub ·
rg-cc delivers 143,248 static cycles saved (−10.3%) and a 33.5 KB smaller text footprint (−6.9%) across 804 C modules, optimising printf formatting, string manipulation, and slab allocation.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 1,390,750 cyc 1,247,502 cyc −143,248 cyc −10.3%
File Size 486,368 B 452,896 B −33,472 B −6.9%
Function GCC 15 rg-cc Delta Optimisation
_doprnt 4,120 3,280 −20.4% Format specifier jump table and integer conversion unrolling
strchr 184 128 −30.4% Leaf frame omission and post-increment byte search
memcpy 240 178 −25.8% Long-word aligned post-increment transfer unrolling
malloc_slab 840 690 −17.9% Free list pointer manipulation with register caching
free_slab 610 510 −16.4% Slab header bitmask test and return epilogue tail-merging
qsort 1,620 1,340 −17.3% Pivot selection and element swap loop strength reduction
sscanf 2,850 2,380 −16.5% Input stream parser state machine jump table inlining
open_trap 190 130 −31.6% GEMDOS trap 1 invocation with register-passed parameters
read_trap 190 130 −31.6% GEMDOS trap 1 invocation with zero stack push overhead
write_trap 190 130 −31.6% GEMDOS trap 1 invocation with leaf frame omission

fVDI

fVDI device driver subsystem

fVDI

ST / Falcon Modular graphics engine & device driver framework · GitHub ·
rg-cc outperforms GCC 15 by 54,670 static cycles (−14.8%) and 13.8 KB text size (−12.1%) across 52 graphics driver modules, optimising rasterisation spans and polygon clipping.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 369,390 cyc 314,720 cyc −54,670 cyc −14.8%
File Size 114,010 B 100,220 B −13,790 B −12.1%
Function GCC 15 rg-cc Delta Optimisation
vdi_v_pline 1,120 890 −20.5% Polyline coordinate array unrolling with displacement step
clip_polygon_edges 2,400 1,920 −20.0% Sutherland-Hodgman clipping intersection compare narrowing
draw_span_list 1,840 1,490 −19.0% Horizontal span rasteriser loop unrolling with move.l
driver_dispatch_call 380 280 −26.3% Device driver function vector jump table inlining
vdi_v_gtext 1,420 1,180 −16.9% Text string character glyph offset folding
palette_map_rgb 480 380 −20.8% 16-bit RGB colour component packing strength reduction
bezier_subdivide 890 720 −19.1% Midpoint subdivision shift math without stack spills
raster_blit_rect 940 790 −16.0% Hardware blitter and software fallback coordinate setup
text_calc_extent 310 240 −22.6% String extent accumulator with leaf frame omission
vdi_v_pmarker 520 430 −17.3% Marker shape plot table offset folding

GEMlib

GEMlib bindings

GEMlib

ST / Falcon Standard GEM bindings · 582 translation units · GitHub ·
rg-cc beats GCC 15 by 10.6 KB (−14.8%) in code size and 26,840 cycles (−9.3%) across 582 modules by avoiding parameter marshalling stub overhead on GEM trap arrays.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 288,600 cyc 261,760 cyc −26,840 cyc −9.3%
File Size 71,938 B 61,312 B −10,626 B −14.8%
Function GCC 15 rg-cc Delta Optimisation
aes_trap_call 190 130 −31.6% Trap 2 call with register-passed parameter block
vdi_trap_call 190 130 −31.6% Trap 2 call with leaf frame omission
mt_objc_draw 340 270 −20.6% AES control block array packing unrolling
mt_form_do 280 220 −21.4% Dialog event parameter passing without stack spill
mt_wind_set 360 290 −19.4% Window attribute coordinate marshaling folding
mt_graf_mouse 260 200 −23.1% Mouse cursor shape pointer parameter pass
mt_evnt_multi 520 430 −17.3% 16-parameter event block marshaling with movem.l
mt_rsrc_gaddr 240 180 −25.0% Resource address query with direct register return
mt_menu_bar 260 200 −23.1% Menu bar show/hide state parameter pass
mt_shel_write 380 310 −18.4% Shell launch command line pointer pass folding

STDL

STDL logo

STDL

ST / Falcon Planar-native DirectMedia Layer (SDL 1.2 subset) · GitHub ·
rg-cc beats GCC 15 by 17.3 KB (−10.2%) in code size and 25,018 cycles (−5.1%) across all 56 modules via branchless bitwise-not diamond folding and CISC addressing in 4-plane blits.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 490,550 cyc 465,532 cyc −25,018 cyc −5.1%
File Size 169,958 B 152,686 B −17,272 B −10.2%
Function GCC 15 rg-cc Delta Optimisation
STDL_SetColourKey 1,800 1,728 −4.0% Branchless conditional bitwise-not diamond folding (x ^ mask)
stdl_blit_4plane_masked 2,100 1,760 −16.2% 4-plane bitplane destination pointer advance folding
stdl_scroll_hardware_sync 420 310 −26.2% STE hardware horizontal fine scroll register updates
stdl_dma_play_buffer 340 260 −23.5% DMA audio frame start/end address register writes
stdl_input_poll 490 380 −22.4% IKBD packet parsing state machine inlining
stdl_surface_lock 180 120 −33.3% Leaf frame omission and address register pass
stdl_surface_unlock 180 120 −33.3% Leaf frame omission and return epilogue tail-merging
stdl_palette_fade 3,200 2,680 −16.3% 16-colour palette component interpolation unrolling
stdl_draw_point 240 190 −20.8% Bitplane pixel bit-set operation strength reduction
stdl_line_fast 1,480 1,240 −16.2% Bresenham line stepping with register-held delta error

CoreMark

CoreMark CPU benchmark

CoreMark

ST / Falcon Industry-standard algorithmic CPU benchmark · GitHub ·
rg-cc produces a 2.8 KB (−11.5%) smaller executable than GCC 15 while executing matrix multiplication, linked list sorting, state machines, and CRC16 at near-parity.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 5,039,944 cyc 4,883,424 cyc −156,520 cyc −3.1%
File Size 24,178 B 21,408 B −2,770 B −11.5%
Function Calls GCC 15 rg-cc Delta Optimisation
matrix_mul_const 100 1,420 1,240 −12.7% 2D matrix stride multiplication converted to shift+add
matrix_add_const 100 890 760 −14.6% Post-increment memory addition unrolling
crcu16 4,096 48 42 −12.5% CRC table lookup with move.w (a0,d0.w),d1 folding
list_sort_step 1,024 180 158 −12.2% Linked list item pointer swap with leaf frame omission
ee_isdigit 2,048 42 34 −19.0% Unsigned range comparison folding ((c - '0') <= 9)
core_bench_matrix 10 142,000 136,500 −3.9% Matrix benchmark harness loop register residency
core_bench_list 10 98,000 95,200 −2.9% List sorting benchmark iteration strength reduction
core_bench_crc 10 64,000 61,800 −3.4% CRC payload buffer verification loop unrolling
core_bench_state 10 112,000 116,400 +3.9% State transition top-of-loop branch alignment
core_state_transition 1,424 666 1,189 +78.5% Switch block layout dispatch alignment (identical insn count: 223 vs 224)

FreeMiNT

FreeMiNT operating system kernel

FreeMiNT

ST / TT / Falcon Preemptive multitasking OS kernel · GitHub ·
rg-cc reduces kernel code size by 55.8 KB (−9.8%) and cuts 102,740 cycles (−8.4%) across process scheduler dispatch, VFS filesystem path lookups, and memory allocator slab traversals.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 1,223,140 cyc 1,120,400 cyc −102,740 cyc −8.4%
File Size 568,240 B 512,480 B −55,760 B −9.8%
Function Calls GCC 15 rg-cc Delta Optimisation
scheduler_switch_context 1,024 480 390 −18.8% Context switch register bank save/restore folding
vfs_lookup_path 512 840 720 −14.3% Path separator scanning with post-increment pointer stepping
kmalloc_slab_alloc 2,048 220 180 −18.2% Slab free-list pointer pop without stack frame
dev_read_stream 256 640 550 −14.1% Device driver buffer transfer loop unrolling
signal_dispatch 512 390 330 −15.4% Signal bitmask test & branchless handler lookup
ipc_send_message 256 720 610 −15.3% Message queue linked-list insert with pointer residency
timer_handle_tick 1,024 180 145 −19.4% Timer delta-chain walk with leaf frame omission
mutex_acquire_spin 4,096 95 78 −17.9% Atomic tas test-and-set sequence generation
pipe_transfer_bytes 128 1,280 1,110 −13.3% Circular ringbuffer copy with modulo wrap folding
kfree_slab_free 2,048 190 160 −15.8% Slab block push to free list with register pairing

libcmini

libcmini runtime library

libcmini

Freestanding / Lightweight Minimalist C runtime for demoscene & games · GitHub ·
rg-cc cuts library code size by 13.4% and static archive footprint by 23.5% vs GCC 15, executing string benchmarks in 12.2% fewer cycles via post-increment pointer scanning and integer formatting strength reduction.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 857,220 cyc 752,648 cyc −104,572 cyc −12.2%
File Size 18,340 B 15,888 B −2,452 B −13.4%
Function Calls GCC 15 rg-cc Delta Optimisation
_strrchr 2,048 257,800 237,120 −8.0% Reverse byte search loop with subq.l #1,a0 folding
_strncpy 1,024 56,120 46,400 −17.3% Dual post-increment move.b (a1)+,(a0)+ with zero spills
_strcmp 4,096 110 92 −16.4% Byte-wise comparison with dbra counter
_memcpy 2,048 380 310 −18.4% Long-word transfer unrolling with tail byte handling
_doprnt 256 2,450 2,120 −13.5% Formatted integer conversion shift-and-add strength reduction
_atoi 1,024 145 118 −18.6% Decimal digit accumulator in data register
_memset 1,024 290 240 −17.2% Long-word fill with post-increment (An)+
_qsort 64 14,200 12,400 −12.7% Partition pivot comparison with leaf frame omission
_strchr 2,048 135 112 −17.0% Post-increment byte scan with early zero termination
_snprintf 256 3,100 2,740 −11.6% Buffer boundary clamp & length tracking

cflib

cflib GEM library

cflib

Atari GEM Utilities GEM dialog, form, and window interface library · GitHub ·
rg-cc slashes compiled library code size by 70.7 KB (−23.0%) and benchmark execution by 15.4% across GEM AES/VDI trap marshalling and recursive RSC object tree walks.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 634,200 cyc 536,540 cyc −97,660 cyc −15.4%
File Size 308,074 B 237,344 B −70,730 B −23.0%
Function Calls GCC 15 rg-cc Delta Optimisation
cf_dialog_draw 120 3,450 2,890 −16.2% Dialog box border and fill drawing with VDI batching
cf_window_clip 240 890 740 −16.9% Rectangle intersection clipping math with register caching
cf_event_loop 60 1,420 1,180 −16.9% Multi-event evnt_multi buffer setup without stack frame
cf_rsc_tree_walk 480 410 330 −19.5% GEM OBJECT tree recursive traversal with pointer residency
cf_calc_rect_union 512 220 175 −20.5% Bounding box union coordinate folding
cf_string_measure 1,024 165 135 −18.2% VDI font metrics lookup in data registers
cf_pop_up_menu 60 4,800 4,120 −14.2% Pop-up menu item hit testing and checkmark rendering
cf_slider_position 360 380 310 −18.4% Slider thumb coordinate scaling via fixed-point shift+add
cf_form_center 120 490 410 −16.3% Screen-centring coordinate division converted to shift
cf_text_edit_cursor 240 720 590 −18.1% Cursor blink timer and character index arithmetic

zlib

zlib compression library

zlib

Standard Compression DEFLATE/INFLATE data compression engine · GitHub ·
rg-cc reduces library code size by 17.3 KB (−18.2%) and speeds up decompression benchmarks by 11.6%, optimising inner Huffman bitstream decoding and Adler-32 unrolling.
Metric GCC 15.1.0 rg-cc Delta %
Cycle Count 3,383,200 cyc 2,990,744 cyc −392,456 cyc −11.6%
File Size 94,820 B 77,536 B −17,284 B −18.2%
Function Calls GCC 15 rg-cc Delta Optimisation
inflate_fast 64 98,372 88,152 −10.4% Huffman bitstream decode loop with pointer variable caching
crc32_z 128 56,264 50,592 −10.1% Unrolled 8-word XOR with constant-offset table base retention
adler32 128 18,400 15,900 −13.6% 16-iteration unrolled modulo addition loop
deflate_slow 32 44,200 39,800 −10.0% Match finder hash chain search with dbra counter
longest_match 512 1,840 1,610 −12.5% String match comparison with post-increment stepping
trees_build_huffman 64 6,400 5,600 −12.5% Frequency heap sift-down with leaf frame omission
fill_window 32 12,800 11,200 −12.5% Sliding dictionary window buffer copy unrolling
flush_pending 128 920 810 −12.0% Pending bit buffer flush with bitwise shift folding
compress_block 64 8,900 7,850 −11.8% Literal and distance symbol emission loop
bi_reverse 1,024 85 72 −15.3% 16-bit word bit reversal with register swapping

Overall Matrix

Games, desktop apps, CoreMark, and zlib report runtime execution cycles; OS kernels and system libraries (EmuTOS, MiNTLib, fVDI, GEMlib, STDL, FreeMiNT, libcmini, cflib) report static per-module cycle estimates.

Project GCC 15 Cycles rg-cc Cycles Cycles Δ GCC 15 Size rg-cc Size Size Δ
Doom8088ST 15,409,616 11,903,712 −22.8% 147,824 B 115,358 B −22.0%
FASTER 42,032,640 34,338,960 −18.3% 161,248 B 130,042 B −19.4%
FreeNukum 12,031,600 9,962,864 −17.2% 224,980 B 201,252 B −10.5%
OpenDUNE 8,836,880 7,340,328 −16.9% 368,912 B 311,988 B −15.4%
OpenTyrian 10,187,748 9,935,044 −2.5% 1,074,028 B 934,402 B −13.0%
TyrQuake 29,358,140 19,162,056 −34.7% 441,860 B 374,580 B −15.2%
TeraDesk 3,814,400 3,121,664 −18.2% 542,110 B 489,864 B −9.6%
mxPlay 3,970,560 3,239,296 −18.4% 138,416 B 112,296 B −18.9%
HighWire 21,850,400 19,230,562 −12.0% 724,560 B 638,802 B −11.8%
Led Blur 5,623,700 4,579,900 −18.6% 142,654 B 104,556 B −26.7%
EmuTOS 1,038,540 935,724 −9.9% 337,028 B 287,718 B −14.6%
MiNTLib 1,390,750 1,247,502 −10.3% 486,368 B 452,896 B −6.9%
fVDI 369,390 314,720 −14.8% 114,010 B 100,220 B −12.1%
GEMlib 288,600 261,760 −9.3% 71,938 B 61,312 B −14.8%
STDL 490,550 465,532 −5.1% 169,958 B 152,686 B −10.2%
CoreMark 5,039,944 4,883,424 −3.1% 24,178 B 21,408 B −11.5%
FreeMiNT 1,223,140 1,120,400 −8.4% 568,240 B 512,480 B −9.8%
libcmini 857,220 752,648 −12.2% 18,340 B 15,888 B −13.4%
cflib 634,200 536,540 −15.4% 308,074 B 237,344 B −23.0%
zlib 3,383,200 2,990,744 −11.6% 94,820 B 77,536 B −18.2%

build.rbs