webcentive
By @tonycasanova, North Carolina, with Grok
performance (A15 at 2.0 GHz, A7 at 1.4 GHz), Grafana/Prometheus stopped, 60-second cool-down between runs. Run IDs 20261202-214055, 214214, and 214334 (2 December 2026, starting 9:40 p.m. Eastern). Built with gcc 9.4.0, kernel 5.4.275. Each cell below is the mean of the three run medians (each median is 21 timed calls) and the sample coefficient of variation (CV%, n−1). Speedup is mean(naive) / mean(variant). All variants verified; INT8 results were exact.Generating one token with a language model multiplies a big weight matrix by a single vector, layer after layer. With one vector there is little reuse of each weight, so the work is a stream of multiply-adds over data that mostly has to come from RAM. Speed is therefore set by how many multiply-adds the CPU can issue (SIMD width, quantization) and by memory bandwidth. This is the same reason the llm.asm project spends its effort on an INT8 AVX2 kernel; see the Phase 2 README, whose own benchmark table credits the INT8 kernel for most of its lead over llama.cpp, with a smaller extra gain from the bare-metal environment.
-O0: the baseline, in its own object file.-O3 -ffast-math: lets GCC auto-vectorize with NEON.vmlaq_f32), four accumulators.pld prefetch.-O3 (exact integer result).vmull_s8 / vpadalq_s16).Every variant is verified against a reference before it is timed; a mismatch stops the run.
That was the prediction. The measured three-run results are below.
Board: ODROID-HC1, Samsung Exynos 5422 (4× Cortex-A15 on CPUs 4–7, 4× Cortex-A7 on CPUs 0–3), 32-bit ARMv7 hard-float, NEON/VFPv4, 2 GB RAM, Ubuntu 20.04, kernel 5.4.275, gcc 9.4.0. Flags: -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard. Shapes (rows × cols): 1024×1024, 2048×2048, and 4864×896. One thread, taskset -c 4-7 then core 0. Each run: 3 warmup calls and 21 timed calls, median kept; clock_gettime(CLOCK_MONOTONIC); 64-byte aligned buffers; fixed seed. The three runs reported here used the performance governor with the clocks held at their maxima, a 60-second pause between runs, and Grafana/Prometheus stopped. Temperature was not recorded. A first run under the ondemand governor is noted separately and is not mixed into these means.
Run 1 on the A15 was a warm-up outlier: float32 assembly at 1024×1024 took 1,959,210 ns versus about 1.04–1.08 million in runs 2 and 3, and -O3 C took 1,690,252 ns versus about 1.32 million. Several other A15 cells in run 1 were also slow. The tables use all three runs, so those CVs are large (up to 38%). Dropping run 1 brings most of those A15 CVs down below 3%. The A7 numbers were stable in all three runs (CV 0.18–2.93%).
Times are the mean, over three runs, of each run’s median nanoseconds per matrix-vector multiply. CV% is the sample standard deviation of those three medians, divided by the mean. GFLOP/s (GOP/s for INT8) counts two operations per element. GB/s is bytes of W, x and y per call, divided by the mean time. Speedup is versus variant 1 on the same core and shape, using the means. CV values of 5% or more are marked in bold.
taskset -c 4-7, one thread, 2.0 GHz| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 8,714,110 | 0.07 | 0.241 | 0.482 | 1.00× |
| 2 f32 C -O3 autovec | 1,444,461 | 14.74 | 1.452 | 2.909 | 6.03× |
| 3 f32 NEON intrinsics | 1,106,474 | 8.41 | 1.895 | 3.798 | 7.88× |
| 4 f32 NEON assembly | 1,359,432 | 38.24 | 1.543 | 3.091 | 6.41× |
| 5 i8 C -O3 autovec | 519,640 | 6.87 | 4.036 | 2.028 | 16.77× |
| 6 i8 NEON intrinsics | 196,139 | 2.82 | 10.692 | 5.372 | 44.43× |
| 7 i8 NEON assembly | 198,070 | 3.89 | 10.588 | 5.320 | 44.00× |
| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 34,925,206 | 0.59 | 0.240 | 0.481 | 1.00× |
| 2 f32 C -O3 autovec | 6,164,981 | 14.52 | 1.361 | 2.724 | 5.67× |
| 3 f32 NEON intrinsics | 5,001,341 | 17.24 | 1.677 | 3.358 | 6.98× |
| 4 f32 NEON assembly | 5,035,632 | 18.01 | 1.666 | 3.335 | 6.94× |
| 5 i8 C -O3 autovec | 2,240,031 | 2.06 | 3.745 | 1.877 | 15.59× |
| 6 i8 NEON intrinsics | 1,369,349 | 13.75 | 6.126 | 3.070 | 25.50× |
| 7 i8 NEON assembly | 1,212,919 | 12.87 | 6.916 | 3.466 | 28.79× |
| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 36,175,875 | 0.31 | 0.241 | 0.483 | 1.00× |
| 2 f32 C -O3 autovec | 6,453,176 | 15.89 | 1.351 | 2.705 | 5.61× |
| 3 f32 NEON intrinsics | 4,859,285 | 4.02 | 1.794 | 3.592 | 7.44× |
| 4 f32 NEON assembly | 4,836,827 | 3.45 | 1.802 | 3.609 | 7.48× |
| 5 i8 C -O3 autovec | 2,292,503 | 1.89 | 3.802 | 1.910 | 15.78× |
| 6 i8 NEON intrinsics | 1,353,697 | 3.54 | 6.439 | 3.234 | 26.72× |
| 7 i8 NEON assembly | 1,228,988 | 3.96 | 7.092 | 3.563 | 29.44× |
Speedup vs naive C (-O0), three-run mean — Cortex-A15
Bar length is linear in speedup versus the -O0 baseline, using the three-run mean times (max 44.43×). Float variants are the darker bars; INT8 the lighter ones. A15 CVs on several cells are high because run 1 was a warm-up outlier; those bars are means, not tight estimates.
1024 × 1024
2048 × 2048
4864 × 896
taskset -c 0, one thread, 1.4 GHz| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 41,558,606 | 1.86 | 0.050 | 0.101 | 1.00× |
| 2 f32 C -O3 autovec | 10,669,030 | 0.52 | 0.197 | 0.394 | 3.90× |
| 3 f32 NEON intrinsics | 4,450,382 | 2.26 | 0.471 | 0.944 | 9.34× |
| 4 f32 NEON assembly | 4,422,395 | 2.58 | 0.474 | 0.950 | 9.40× |
| 5 i8 C -O3 autovec | 2,786,837 | 1.14 | 0.753 | 0.378 | 14.91× |
| 6 i8 NEON intrinsics | 1,224,683 | 0.95 | 1.712 | 0.860 | 33.93× |
| 7 i8 NEON assembly | 1,177,682 | 1.26 | 1.781 | 0.895 | 35.29× |
| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 166,404,082 | 1.47 | 0.050 | 0.101 | 1.00× |
| 2 f32 C -O3 autovec | 42,862,402 | 0.38 | 0.196 | 0.392 | 3.88× |
| 3 f32 NEON intrinsics | 18,433,488 | 0.66 | 0.455 | 0.911 | 9.03× |
| 4 f32 NEON assembly | 18,287,987 | 0.53 | 0.459 | 0.918 | 9.10× |
| 5 i8 C -O3 autovec | 12,632,048 | 2.66 | 0.664 | 0.333 | 13.17× |
| 6 i8 NEON intrinsics | 5,301,259 | 1.32 | 1.582 | 0.793 | 31.39× |
| 7 i8 NEON assembly | 5,209,092 | 2.93 | 1.610 | 0.807 | 31.94× |
| Variant | Mean ns | CV% | GFLOP/s or GOP/s | GB/s | Speedup vs 1 |
|---|---|---|---|---|---|
| 1 f32 C -O0 (naive) | 173,280,059 | 1.52 | 0.050 | 0.101 | 1.00× |
| 2 f32 C -O3 autovec | 44,290,545 | 0.33 | 0.197 | 0.394 | 3.91× |
| 3 f32 NEON intrinsics | 18,970,795 | 2.12 | 0.459 | 0.920 | 9.13× |
| 4 f32 NEON assembly | 18,826,892 | 1.88 | 0.463 | 0.927 | 9.20× |
| 5 i8 C -O3 autovec | 13,335,661 | 0.32 | 0.654 | 0.328 | 12.99× |
| 6 i8 NEON intrinsics | 5,534,176 | 0.18 | 1.575 | 0.791 | 31.31× |
| 7 i8 NEON assembly | 5,530,176 | 0.61 | 1.576 | 0.792 | 31.33× |
Speedup vs naive C (-O0), three-run mean — Cortex-A7
Bar length is linear in speedup versus the -O0 baseline, using the three-run mean times (max 44.43×). Float variants are the darker bars; INT8 the lighter ones. A15 CVs on several cells are high because run 1 was a warm-up outlier; those bars are means, not tight estimates.
1024 × 1024
2048 × 2048
4864 × 896
For each run, the assembly-versus-intrinsics delta is (time of the intrinsics kernel / time of the assembly kernel − 1), as a percent. Positive means assembly was faster. A result is flagged as holding up only if all three runs have the same sign and the mean delta is larger than about twice the combined CVs of the two kernels, taken as 2 × hypot(CVintrinsics, CVassembly). That is a conservative test on only three runs.
| Core | Shape | Kind | R1 | R2 | R3 | Mean | Range | 2×hypot(CV) | Holds up? |
|---|---|---|---|---|---|---|---|---|---|
| A15 | 1024 × 1024 | f32 | -38.16% | -0.35% | -0.71% | -13.07% | -38.16% to -0.35% | 78.31% | No |
| A15 | 1024 × 1024 | i8 | -2.80% | -1.06% | +1.05% | -0.94% | -2.80% to +1.05% | 9.61% | No |
| A15 | 2048 × 2048 | f32 | -1.42% | -0.12% | -0.25% | -0.60% | -1.42% to -0.12% | 49.86% | No |
| A15 | 2048 × 2048 | i8 | +14.00% | +13.04% | +11.42% | +12.82% | +11.42% to +14.00% | 37.66% | No |
| A15 | 4864 × 896 | f32 | +1.12% | +0.03% | +0.21% | +0.45% | +0.03% to +1.12% | 10.60% | No |
| A15 | 4864 × 896 | i8 | +9.46% | +11.53% | +9.50% | +10.16% | +9.46% to +11.53% | 10.63% | No |
| A7 | 1024 × 1024 | f32 | +0.22% | +0.72% | +0.97% | +0.64% | +0.22% to +0.97% | 6.87% | No |
| A7 | 1024 × 1024 | i8 | +4.36% | +3.90% | +3.72% | +3.99% | +3.72% to +4.36% | 3.16% | Yes |
| A7 | 2048 × 2048 | f32 | +0.76% | +0.63% | +0.99% | +0.80% | +0.63% to +0.99% | 1.70% | No |
| A7 | 2048 × 2048 | i8 | +2.62% | +2.93% | -0.15% | +1.80% | -0.15% to +2.93% | 6.42% | No |
| A7 | 4864 × 896 | f32 | +1.40% | +0.38% | +0.50% | +0.76% | +0.38% to +1.40% | 5.67% | No |
| A7 | 4864 × 896 | i8 | +0.50% | -0.42% | +0.14% | +0.07% | -0.42% to +0.50% | 1.27% | No |
Under that rule, only one comparison holds up: A7 INT8 at 1024×1024, where assembly is 4.0% faster than intrinsics (range 3.7% to 4.4%). No float32 assembly advantage holds up; the per-run differences are typically under 1.5% once the run-1 A15 1024×1024 outlier (assembly 38% slower in that one run) is read as a warm-up, not as a kernel effect.
Two A15 INT8 cases are consistent in sign and size — +11.4% to +14.0% (mean +12.8%) at 2048×2048, and +9.5% to +11.5% (mean +10.2%) at 4864×896 — but they do not pass the test on all three runs, because run 1 inflates the CVs of the absolute times (the two kernels slowed together). If run 1 is dropped, both would pass a 2×CV test. They are noted here as suggestive, not as confirmed under the pre-set rule.
INT8 SIMD is still the large effect. Against naive float32 C at -O0, the INT8 NEON kernels (variants 6 and 7) are 25–44× faster on the A15 and 31–35× faster on the A7, using three-run means. The 1024×1024 INT8 case remains the outlier (about 44× on the A15): that weight matrix is 1.0 MB and the effective bandwidth is 5.3–5.4 GB/s, versus about 3.1–3.6 GB/s on the 4 MB+ INT8 shapes, which look more memory-bound.
NEON already beats auto-vectorized C, before anyone writes assembly. Float32 NEON intrinsics are 1.23–1.33× the -O3 autovec kernel on the A15, and 2.33–2.40× on the A7, from the three-run means of variants 3 and 2.
Conclusion. On this board, with the clocks locked, the 25–44× gains come from SIMD, INT8, and cache or memory bandwidth — not from writing the kernel in assembly rather than C intrinsics. Hand-written assembly beat well-written NEON intrinsics in only one comparison that clears a simple three-run consistency test (about 4% on the A7, INT8, 1024×1024). That is consistent with llm.asm, whose published gains over llama.cpp come mainly from its INT8 kernel, not from deleting the operating system or from assembly as such.
An earlier single run, 20261202-213433, used the ondemand governor (the script saw 1.0 GHz at start; maxima 2.0 / 1.4 GHz). Those figures are not included in the means above and should not be compared directly with the locked-clock numbers. Qualitatively they already showed the same story: INT8 NEON was the large win (18–49× vs naive), and assembly versus intrinsics was mixed. That run also did not record temperature, and it was only one 21-repetition pass, so run-to-run variation was unknown until the three performance runs.
-ffast-math, which GCC needs in order to auto-vectorize a float reduction. That is stated in the Makefile.The llm.asm project (MIT) writes Qwen3-0.6B inference and a bootable x86-64 OS in assembly. Its published EPYC 7642 table shows an exact FP32-activation assembly path slower than llama.cpp Q8_0, and an INT8 path faster, which is why this experiment tests float and INT8 separately. The project is x86-64 (AVX2/FMA/F16C) and cannot run on this 32-bit ARM board; this kit asked the same question with ARM NEON and, after three locked-clock runs, got the same qualitative answer. Related reading: issue #29 (independent reproduction), the @IntCyberDigest post, the Qwen3-0.6B model card and the official GGUF repository.
Computed three-run summary (means, sample SD, CV%, speedups and assembly-versus-intrinsics deltas): results/summary-3runs.csv.
Raw board output, one pair per run (each run’s median of 21 timed calls). The first run used the ondemand governor; the next three used performance with a 60-second cool-down:
The four raw run files are copied onto the server alongside this page; if a link 404s, the file has not been placed in results/ yet.
The benchmark kit is in kit/. Download kit/asmbench.zip, or browse the sources: bench.c, kernels.h, naive_o0.c, kernels_c.c, kernels_neon.c, matvec_neon.S, Makefile, run.sh, and README.md.
unzip asmbench.zip && cd asmbench make # optional, for locked clocks (the script does not change the governor): echo performance | sudo tee /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor echo performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor for i in 1 2 3; do ./run.sh; sleep 60; done
Stop llama.cpp and other heavy jobs first. Each call writes results-<date>.csv and .txt.