raylib performance — backend comparison
rlvk (kosmickrisp) vs rlvk (kosmickrisp threaded) | GPU Apple M5 (24576 MB) | Driver KosmicKrisp Mesa 26.2.0 | OS macOS 26.5.1 | 3 runs × 10000 ms full speed
Green = best backend for that example/metric, red = worst. Frame time & FPS are the representative run; software (rlsw) has no GPU so its VRAM is ~0. Shader-heavy examples may not execute custom shaders on the software backend.
° = at that backend's floor (median within 15% of its own bench_idle median): the scene finishes its real work faster than one present/loop turnaround, so the number measures presentation pacing or loop overhead, not rendering cost, and cross-backend ratios there compare present plumbing. On macOS, Metal-backed Vulkan presents pace on drawable acquire (~1.6-1.8 ms) while GL's IOSurface flush has no floor - only rows without ° compare backend rendering cost.
Read this before comparing FPS on macOS. Uncapped FPS on light scenes here measures presentation, not rendering. Apple GL presents by flushing an IOSurface — no per-frame handshake, essentially free — while Vulkan on macOS (MoltenVK or KosmicKrisp) can only present through Metal, which must acquire a CAMetalDrawable from CoreAnimation each frame, paced at ~1.6–1.8 ms on a composited window no matter how little the frame draws. Measured on shapes_basic_shapes, uncapped: frame interval avg 1.95 ms, of which 1.76 ms (90%) is "Retrieve a CAMetalDrawable" (MoltenVK's own performance tracking; the drawing itself costs ~0.12 ms and the GPU is nearly idle). Every native Metal app pays the same pacing; no driver knob removes it (KosmicKrisp's is lowered from ~3.3 to ~1.6 ms by MESA_VK_WSI_PRESENT_MODE=mailbox, MoltenVK's config surface is exhausted). Cells marked ° sit at that backend's floor: their cross-backend ratios compare macOS present plumbing. Rows above the floor compare real rendering — there the Vulkan backend leads (e.g. 8000 draw calls: 120 fps GL vs 581 fps rlvk). Under vsync all backends lock to the display rate and the floor is invisible.
speedup = rlvk (kosmickrisp threaded) relative to rlvk (kosmickrisp), per metric direction (>1x favors rlvk (kosmickrisp threaded)); ° on a ratio means at least one side sits at its floor, so it compares present plumbing.
Frames per second (higher is better)
Sustained FPS at full speed (uncapped).| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 598° | 4734° | 7.92x° |
| textures_tiled_drawing | 572° | 4469° | 7.82x° |
| textures_particles_blending | 599° | 3944° | 6.58x° |
| shapes_starfield_effect | 599° | 4730° | 7.90x° |
| models_loading | 565° | 4275° | 7.57x° |
| models_heightmap_rendering | 466° | 3979° | 8.54x° |
| models_skybox_rendering | 599° | 4368° | 7.29x° |
| models_waving_cubes | 599° | 1171 | 1.96x° |
| models_first_person_maze | 564° | 4411° | 7.83x° |
| core_3d_camera_free | 564° | 4680° | 8.29x° |
| shaders_basic_lighting | 569° | 3360 | 5.90x° |
| shaders_basic_pbr | 366 | 3157 | 8.63x |
| shaders_mandelbrot_set | 535° | 3013 | 5.63x° |
| shaders_raymarching_rendering | 250 | 235 | 0.94x |
| performance_stress_test | 146 | 136 | 0.93x |
| performance_stress_test_direct | 4 | 4 | 0.91x |
| bench_idle | 570° | 4295° | 7.53x° |
| bench_drawcalls | 552° | 1638 | 2.97x° |
| bench_instanced | 496° | 3602 | 7.27x° |
Median frame time, ms (lower is better)
Median per-frame CPU wall time.| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 1.597° | 0.202° | 7.91x° |
| textures_tiled_drawing | 1.599° | 0.220° | 7.27x° |
| textures_particles_blending | 1.597° | 0.248° | 6.44x° |
| shapes_starfield_effect | 1.597° | 0.204° | 7.83x° |
| models_loading | 1.598° | 0.228° | 7.01x° |
| models_heightmap_rendering | 1.615° | 0.246° | 6.57x° |
| models_skybox_rendering | 1.597° | 0.224° | 7.13x° |
| models_waving_cubes | 1.597° | 0.760 | 2.10x° |
| models_first_person_maze | 1.599° | 0.222° | 7.20x° |
| core_3d_camera_free | 1.599° | 0.205° | 7.80x° |
| shaders_basic_lighting | 1.598° | 0.291 | 5.49x° |
| shaders_basic_pbr | 2.668 | 0.310 | 8.61x |
| shaders_mandelbrot_set | 1.604° | 0.324 | 4.95x° |
| shaders_raymarching_rendering | 3.784 | 3.698 | 1.02x |
| performance_stress_test | 6.874 | 7.322 | 0.94x |
| performance_stress_test_direct | 236.272 | 259.268 | 0.91x |
| bench_idle | 1.612° | 0.227° | 7.10x° |
| bench_drawcalls | 1.635° | 0.558 | 2.93x° |
| bench_instanced | 1.814° | 0.272 | 6.67x° |
Average frame time, ms (lower is better)
Mean per-frame wall time.| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 1.672° | 0.211° | 7.92x° |
| textures_tiled_drawing | 1.749° | 0.224° | 7.82x° |
| textures_particles_blending | 1.670° | 0.254° | 6.58x° |
| shapes_starfield_effect | 1.670° | 0.211° | 7.90x° |
| models_loading | 1.771° | 0.234° | 7.57x° |
| models_heightmap_rendering | 2.147° | 0.251° | 8.54x° |
| models_skybox_rendering | 1.669° | 0.229° | 7.29x° |
| models_waving_cubes | 1.669° | 0.854 | 1.96x° |
| models_first_person_maze | 1.775° | 0.227° | 7.83x° |
| core_3d_camera_free | 1.772° | 0.214° | 8.29x° |
| shaders_basic_lighting | 1.757° | 0.298 | 5.90x° |
| shaders_basic_pbr | 2.733 | 0.317 | 8.63x |
| shaders_mandelbrot_set | 1.870° | 0.332 | 5.63x° |
| shaders_raymarching_rendering | 3.996 | 4.256 | 0.94x |
| performance_stress_test | 6.867 | 7.380 | 0.93x |
| performance_stress_test_direct | 236.202 | 259.571 | 0.91x |
| bench_idle | 1.754° | 0.233° | 7.53x° |
| bench_drawcalls | 1.811° | 0.610 | 2.97x° |
| bench_instanced | 2.017° | 0.278 | 7.27x° |
CPU utilization, %
Average process CPU as percent of the whole machine.| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 3.2 | 5.5 | 0.58x |
| textures_tiled_drawing | 3.2 | 5.0 | 0.63x |
| textures_particles_blending | 3.2 | 4.5 | 0.72x |
| shapes_starfield_effect | 3.2 | 5.6 | 0.57x |
| models_loading | 3.1 | 4.8 | 0.64x |
| models_heightmap_rendering | 2.9 | 4.3 | 0.68x |
| models_skybox_rendering | 3.1 | 4.9 | 0.64x |
| models_waving_cubes | 9.0 | 10.2 | 0.88x |
| models_first_person_maze | 3.1 | 4.9 | 0.63x |
| core_3d_camera_free | 3.1 | 5.4 | 0.57x |
| shaders_basic_lighting | 3.9 | 4.7 | 0.83x |
| shaders_basic_pbr | 3.3 | 4.3 | 0.77x |
| shaders_mandelbrot_set | 4.1 | 4.8 | 0.84x |
| shaders_raymarching_rendering | 0.5 | 0.5 | 0.99x |
| performance_stress_test | 10.4 | 10.5 | 0.99x |
| performance_stress_test_direct | 0.0 | 0.0 | 0.56x |
| bench_idle | 4.4 | 4.7 | 0.93x |
| bench_drawcalls | 8.2 | 8.9 | 0.92x |
| bench_instanced | 3.9 | 4.6 | 0.85x |
RAM, MB
Average working-set memory.| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 93.4 | 96.7 | 0.97x |
| textures_tiled_drawing | 93.6 | 96.6 | 0.97x |
| textures_particles_blending | 93.5 | 95.8 | 0.98x |
| shapes_starfield_effect | 93.4 | 96.8 | 0.97x |
| models_loading | 108.4 | 111.6 | 0.97x |
| models_heightmap_rendering | 95.7 | 98.7 | 0.97x |
| models_skybox_rendering | 169.9 | 173.0 | 0.98x |
| models_waving_cubes | 100.9 | 100.7 | 1.00x |
| models_first_person_maze | 94.0 | 96.8 | 0.97x |
| core_3d_camera_free | 93.2 | 96.7 | 0.96x |
| shaders_basic_lighting | 111.6 | 115.2 | 0.97x |
| shaders_basic_pbr | 148.4 | 151.8 | 0.98x |
| shaders_mandelbrot_set | 111.5 | 115.8 | 0.96x |
| shaders_raymarching_rendering | 126.3 | 126.5 | 1.00x |
| performance_stress_test | 199.4 | 198.6 | 1.00x |
| performance_stress_test_direct | 111.1 | 111.4 | 1.00x |
| bench_idle | 93.1 | 95.7 | 0.97x |
| bench_drawcalls | 94.7 | 95.0 | 1.00x |
| bench_instanced | 111.6 | 113.1 | 0.99x |
GPU VRAM, MB
Average per-process video memory.| Example | rlvk (kosmickrisp) | rlvk (kosmickrisp threaded) | rlvk (kosmickrisp threaded) speedup |
|---|
| shapes_basic_shapes | 0.0 | 0.0 | — |
| textures_tiled_drawing | 0.0 | 0.0 | — |
| textures_particles_blending | 0.0 | 0.0 | — |
| shapes_starfield_effect | 0.0 | 0.0 | — |
| models_loading | 0.0 | 0.0 | — |
| models_heightmap_rendering | 0.0 | 0.0 | — |
| models_skybox_rendering | 0.0 | 0.0 | — |
| models_waving_cubes | 0.0 | 0.0 | — |
| models_first_person_maze | 0.0 | 0.0 | — |
| core_3d_camera_free | 0.0 | 0.0 | — |
| shaders_basic_lighting | 0.0 | 0.0 | — |
| shaders_basic_pbr | 0.0 | 0.0 | — |
| shaders_mandelbrot_set | 0.0 | 0.0 | — |
| shaders_raymarching_rendering | 0.0 | 0.0 | — |
| performance_stress_test | 0.0 | 0.0 | — |
| performance_stress_test_direct | 0.0 | 0.0 | — |
| bench_idle | 0.0 | 0.0 | — |
| bench_drawcalls | 0.0 | 0.0 | — |
| bench_instanced | 0.0 | 0.0 | — |