Sloppy requirements report

Generated 2026-10-09 00:52 on x86_64 Linux (8 hardware threads). Load average at start: 2.2. Times are best-of-N CPU times (user + sys) unless noted; instruction counts are exact.

1. Self-hosting

2. Tests

moderesult
native, debug49 passed, 0 failed
native, release49 passed, 0 failed
web (wasm under node), debug43 passed, 0 failed
web (wasm under node), release43 passed, 0 failed
C bootstrap compiler17 passed, 0 failed
language server (sloppy lsp, driven as an editor would)50 passed, 0 failed
rendering (software renderer vs references; also on the GPU when there is a display)16 passed, 0 failed
differential fuzzing: random programs (unions, closures, soa, n-D arrays...) built 4 ways (+ the C bootstrap compiler for its subset)60 programs, 0 mismatches (seeds 455840525..455840584)

3. Compile speed

Generated program bench/big.jo: 50009 lines (2000 functions, loops, structs, strings, floats), and the equivalent C program bench/big.c (66012 lines).

compilerCPU timelines / secondinstructions
sloppy (debug build)0.180 s277,8281.29 G
sloppy (release build)0.420 s119,0693.23 G
gcc -O05.210 s12,670

Release builds take 2.3x the time of debug builds (requirement: at most 10x).

4. Script workflow (sloppy file.jo: compile + run)

programlinescompile + run (wall)
hello world115 ms
examples/lumen/lumen.jo (compile only)45358 ms
examples/dunes/dunes.jo (compile only)43058 ms

5. Runtime performance vs C

Each benchmark exists as Sloppy and as equivalent C (bench/rt). Ratios are Sloppy time / C time (lower is better).

benchmarkC -O2C -O0Sloppy releaseSloppy debugrelease / C -O2
fannkuch0.17 s0.39 s0.26 s0.87 s1.53x
mandel0.21 s0.37 s0.20 s0.22 s0.95x
nbody0.35 s1.36 s0.46 s2.05 s1.31x
sieve0.11 s0.28 s0.12 s0.32 s1.09x
spectral0.10 s0.37 s0.14 s0.95 s1.40x

Geometric mean, Sloppy release / C -O2: 1.24x.

Hot loops of a game (bench/loops): nanoseconds per element, Sloppy release vs C -O2 (the C dotted expression also makes a new array each time):

loopC -O2Sloppy releaseratio
aos update3.26 ns3.12 ns0.96x
soa update2.20 ns1.57 ns0.71x
struct field arrays1.19 ns0.73 ns0.61x
plain arrays1.17 ns0.72 ns0.62x
dotted new array1.59 ns0.98 ns0.62x
sin10.99 ns13.61 ns1.24x
cos11.21 ns13.54 ns1.21x

Loops the compiler vectorizes (bench/simd, arrays that fit in the cache): nanoseconds per element. Sloppy uses AVX2 where the processor has it and SSE2 otherwise (SLOPPY_NO_AVX=1 forces SSE2), from one executable; gcc -O2 vectorizes with SSE2, the x86-64 baseline:

loopC -O2Sloppy (AVX2)Sloppy (SSE2)same results
axpy f320.212 ns0.110 ns0.186 nsyes
scale f640.424 ns0.189 ns0.320 nsyes
iadd i320.134 ns0.085 ns0.659 nsyes
dotted f640.417 ns0.289 ns0.533 nsyes

Game logic (bench/game/swarm: 3000 agents flocking, a spatial hash, shooting, events, respawning, sorting, strings; no window), milliseconds per frame. The C version (swarm.c) is what a C programmer would write (buffers reused, its own random numbers):

C -O2Sloppy releaseSloppy debugrelease / C
2.46 ms4.63 ms13.02 ms1.88x

6. CPU parallelism

parallel_map over 1M Collatz lengths on 8 hardware threads: 4.1x faster than map (results identical: true).

7. Native executables are static

8. Web builds

9. Games (native, OpenGL ES 3)

gamemodeframe CPU time (update + draw + submit)pixels, how frames reach the screenscreenshot
lumendebug0.90 ms2133x1200 pixels, wayland+libdecor dma-buf, scale 1.6671938 colors
lumenrelease0.91 ms2133x1200 pixels, wayland+libdecor dma-buf, scale 1.6671938 colors
dunesdebug1.12 ms2133x1200 pixels, wayland+libdecor dma-buf, scale 1.6677678 colors
dunesrelease1.24 ms2133x1200 pixels, wayland+libdecor dma-buf, scale 1.6677678 colors

10. Without a GPU driver (software renderer)

With no OpenGL ES driver (or SLOPPY_SOFTWARE=1) the same binaries draw with a multithreaded software renderer that runs the Sloppy shader functions on the CPU, at half resolution. Without libX11 it speaks the X11 protocol itself, and screenshot runs need no display at all. Below, frame 60 of each game rendered with no display and no GPU, compared with the GPU's frame:

gamesoftware frame CPU timemean abs difference vs GPU frame (0-255)
cube3.99 ms0.56
lumen25.47 ms1.28
dunes86.11 ms1.13