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).
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes598°4734°7.92x°
textures_tiled_drawing572°4469°7.82x°
textures_particles_blending599°3944°6.58x°
shapes_starfield_effect599°4730°7.90x°
models_loading565°4275°7.57x°
models_heightmap_rendering466°3979°8.54x°
models_skybox_rendering599°4368°7.29x°
models_waving_cubes599°11711.96x°
models_first_person_maze564°4411°7.83x°
core_3d_camera_free564°4680°8.29x°
shaders_basic_lighting569°33605.90x°
shaders_basic_pbr36631578.63x
shaders_mandelbrot_set535°30135.63x°
shaders_raymarching_rendering2502350.94x
performance_stress_test1461360.93x
performance_stress_test_direct440.91x
bench_idle570°4295°7.53x°
bench_drawcalls552°16382.97x°
bench_instanced496°36027.27x°

Median frame time, ms (lower is better)

Median per-frame CPU wall time.
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes1.597°0.202°7.91x°
textures_tiled_drawing1.599°0.220°7.27x°
textures_particles_blending1.597°0.248°6.44x°
shapes_starfield_effect1.597°0.204°7.83x°
models_loading1.598°0.228°7.01x°
models_heightmap_rendering1.615°0.246°6.57x°
models_skybox_rendering1.597°0.224°7.13x°
models_waving_cubes1.597°0.7602.10x°
models_first_person_maze1.599°0.222°7.20x°
core_3d_camera_free1.599°0.205°7.80x°
shaders_basic_lighting1.598°0.2915.49x°
shaders_basic_pbr2.6680.3108.61x
shaders_mandelbrot_set1.604°0.3244.95x°
shaders_raymarching_rendering3.7843.6981.02x
performance_stress_test6.8747.3220.94x
performance_stress_test_direct236.272259.2680.91x
bench_idle1.612°0.227°7.10x°
bench_drawcalls1.635°0.5582.93x°
bench_instanced1.814°0.2726.67x°

Average frame time, ms (lower is better)

Mean per-frame wall time.
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes1.672°0.211°7.92x°
textures_tiled_drawing1.749°0.224°7.82x°
textures_particles_blending1.670°0.254°6.58x°
shapes_starfield_effect1.670°0.211°7.90x°
models_loading1.771°0.234°7.57x°
models_heightmap_rendering2.147°0.251°8.54x°
models_skybox_rendering1.669°0.229°7.29x°
models_waving_cubes1.669°0.8541.96x°
models_first_person_maze1.775°0.227°7.83x°
core_3d_camera_free1.772°0.214°8.29x°
shaders_basic_lighting1.757°0.2985.90x°
shaders_basic_pbr2.7330.3178.63x
shaders_mandelbrot_set1.870°0.3325.63x°
shaders_raymarching_rendering3.9964.2560.94x
performance_stress_test6.8677.3800.93x
performance_stress_test_direct236.202259.5710.91x
bench_idle1.754°0.233°7.53x°
bench_drawcalls1.811°0.6102.97x°
bench_instanced2.017°0.2787.27x°

CPU utilization, %

Average process CPU as percent of the whole machine.
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes3.25.50.58x
textures_tiled_drawing3.25.00.63x
textures_particles_blending3.24.50.72x
shapes_starfield_effect3.25.60.57x
models_loading3.14.80.64x
models_heightmap_rendering2.94.30.68x
models_skybox_rendering3.14.90.64x
models_waving_cubes9.010.20.88x
models_first_person_maze3.14.90.63x
core_3d_camera_free3.15.40.57x
shaders_basic_lighting3.94.70.83x
shaders_basic_pbr3.34.30.77x
shaders_mandelbrot_set4.14.80.84x
shaders_raymarching_rendering0.50.50.99x
performance_stress_test10.410.50.99x
performance_stress_test_direct0.00.00.56x
bench_idle4.44.70.93x
bench_drawcalls8.28.90.92x
bench_instanced3.94.60.85x

RAM, MB

Average working-set memory.
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes93.496.70.97x
textures_tiled_drawing93.696.60.97x
textures_particles_blending93.595.80.98x
shapes_starfield_effect93.496.80.97x
models_loading108.4111.60.97x
models_heightmap_rendering95.798.70.97x
models_skybox_rendering169.9173.00.98x
models_waving_cubes100.9100.71.00x
models_first_person_maze94.096.80.97x
core_3d_camera_free93.296.70.96x
shaders_basic_lighting111.6115.20.97x
shaders_basic_pbr148.4151.80.98x
shaders_mandelbrot_set111.5115.80.96x
shaders_raymarching_rendering126.3126.51.00x
performance_stress_test199.4198.61.00x
performance_stress_test_direct111.1111.41.00x
bench_idle93.195.70.97x
bench_drawcalls94.795.01.00x
bench_instanced111.6113.10.99x

GPU VRAM, MB

Average per-process video memory.
Examplerlvk (kosmickrisp)rlvk (kosmickrisp threaded)rlvk (kosmickrisp threaded) speedup
shapes_basic_shapes0.00.0
textures_tiled_drawing0.00.0
textures_particles_blending0.00.0
shapes_starfield_effect0.00.0
models_loading0.00.0
models_heightmap_rendering0.00.0
models_skybox_rendering0.00.0
models_waving_cubes0.00.0
models_first_person_maze0.00.0
core_3d_camera_free0.00.0
shaders_basic_lighting0.00.0
shaders_basic_pbr0.00.0
shaders_mandelbrot_set0.00.0
shaders_raymarching_rendering0.00.0
performance_stress_test0.00.0
performance_stress_test_direct0.00.0
bench_idle0.00.0
bench_drawcalls0.00.0
bench_instanced0.00.0