GFLOPS Definition on CPU: Peak, Sustained and WASM Inference

The GFLOPS definition on a CPU: how peak is computed from cores, clock and SIMD width, and why WASM and Pyodide inference reach far less of it.

GFLOPS Definition on CPU: Peak, Sustained and WASM Inference
Written by TechnoLynx Published on 11 Jul 2026

By the standard GFLOPS definition, GFLOPS (gigaFLOPS) is a measure of compute: floating-point operations per second, counted in billions. A CPU’s quoted GFLOPS is a theoretical peak, the product of its core count, its clock frequency and the floating-point operations each core can complete per cycle. That peak is a ceiling, not a forecast. A WebAssembly inference path gets a fraction of it, because Wasm SIMD is 128-bit only, Pyodide has no threading, and memory stalls still apply. Used correctly, the figure becomes one input to the larger decision about how Pyodide runs inference in WASM and when it fits: it sets the upper bound that a fit assessment measures real throughput against.

How Does GFLOPS on a CPU Work, and What Does It Mean in Practice?

A GFLOPS rating counts how many floating-point operations the processor’s cores could complete each second at their full per-cycle rate. The rating depends on the data type: a device has different peak rates for different precisions, with faster rates for ML-oriented types such as FP16 or FP8. Peak FLOPs has traditionally been quoted for matrix multiplication (GEMM). Hardware FLOPS figures are also reported specifically for multiply-add operations.

In practice, a CPU GFLOPS figure tells you the most floating-point work a chip could do at one precision. What it achieves under realistic conditions is a separate, measured figure. The industry has drawn this line for a long time: when Intel demonstrated a processor crossing a teraFLOPS, it stressed that the figure was sustained and not the “raw” number others used to get higher but less meaningful results. For inference work, read the spec-sheet number as the top of the scale, then work out how far down the scale your runtime and your model actually sit. Our guide to what each CPU spec number means for AI workloads puts GFLOPS alongside the other figures on a CPU datasheet.

How Do You Calculate Theoretical Peak GFLOPS from Cores, Clock and SIMD Width?

Peak GFLOPS equals cores × clock frequency (GHz) × FLOPs per core per cycle. FLOPs per cycle in turn equals SIMD lanes (vector width divided by element width) × 2 for fused multiply-add × the number of vector FMA units per core. The worked example below runs that arithmetic on one hypothetical CPU and then follows the ceiling down as each WASM restriction applies. That makes the size of each loss visible before anything is measured.

Worked Example: From Spec-Sheet Peak to a WASM Ceiling

Assumptions, stated as assumptions: a hypothetical 8-core CPU at 3.2 GHz with two 512-bit FMA units per core, running FP32 (32-bit) arithmetic, and 128-bit Wasm SIMD issuing to both units each cycle. These are not the specifications of any particular product. Every number in the table is arithmetic on these assumptions except the 2.8 GHz clock, borrowed from Travis Downs’s measurement of an AVX-512 licence drop on a real Intel chip.

Step FLOPs per core per cycle Cores used Clock Ceiling
Native peak, 512-bit FMA: 16 lanes × 2 (FMA) × 2 units 64 8 3.2 GHz 1,638.4 GFLOPS
Native under an AVX-512 licence drop from 3.2 to 2.8 GHz, as measured by Travis Downs (2020) 64 8 2.8 GHz 1,433.6 GFLOPS
WASM 128-bit SIMD, no FMA: 4 lanes × 2 units, one multiply or add each 8 8 3.2 GHz 204.8 GFLOPS
WASM with Relaxed SIMD FMA, if the engine maps it to hardware FMA: 4 × 2 × 2 16 8 3.2 GHz 409.6 GFLOPS
WASM 128-bit, single thread (Pyodide, no threading): 8 FLOPs per cycle on one core 8 1 3.2 GHz 25.6 GFLOPS

The last row is the important one. If the runtime cannot spread work across cores, a single-threaded, 128-bit WASM path starts, on this hypothetical CPU, from a ceiling one sixty-fourth of the native spec-sheet peak (25.6 divided by 1,638.4), and nothing has been lost to overhead or memory yet. On this page the formula matters for one reason: each of its terms is something the WASM runtime can reduce.

Why Is Sustained GFLOPS so Much Lower than the Theoretical Peak?

Sustained GFLOPS falls short of peak because the peak assumes every unit fires every cycle at the rated clock, and the clock, memory and startup limits below break them. AMD’s ROCm team (2024) separates peak from “Max-Achievable FLOPs”. They define the latter as the best throughput under realistic conditions (normalised data initialisation, stable thermal conditions, cold caches) using a device-specific optimal matrix size. So even the best achievable number is a measured quantity under controlled conditions, not a property you read off the box.

One tuned blocked algorithm gets close, but not all the way. Peise (2017) reports a blocked algorithm reaching 91.01% of a processor’s theoretical peak on a single core, while on all 12 cores the same algorithm reached 69.70% efficiency. Even this tuned blocked kernel loses about 30% of peak once all 12 cores are busy.

Three limits show up clearly in the measurements:

  • Clock licences under wide SIMD. On Intel parts with AVX-512, running 512-bit instructions dropped the frequency from 3.2 GHz to 2.8 GHz in Travis Downs’s 2020 measurements. Each frequency transition halted the CPU for about 11 μs, and voltage transitions throttled instruction dispatch to a quarter of the normal rate for roughly 8 to 20 μs. The same measurements found that 256-bit instructions also caused the quarter-rate slowdown during a voltage transition, contrary to the conventional wisdom that light 256-bit code carries no penalty.
  • Memory stalls. Kernels that are thin in at least one dimension are limited by memory bandwidth, not by compute FLOPs. In McCalpin’s STREAM reference material, several high-end machines ran simple arithmetic kernels on out-of-cache operands at 4-5% of their rated peak, sitting idle for the rest of the time while cache misses were served.
  • Startup and small problems. In Peise’s measurements, BLAS library initialisation added overhead to the first dgemm call: 7.28 ms for MKL on a 100×100 problem, against a second-call time of 0.86 ms.

Measurement noise is the final trap. On a laptop with a browser and music player running in the background, Peise found the standard deviation of 100×100 dgemm timings exceeded four times the mean runtime. On a quiet cluster node it was 2.36%. A single quick run in a browser tab tells you very little.

None of this replaces measurement.

How Do WASM’s SIMD and Threading Limits Cut the GFLOPS You Can Use?

WebAssembly inference runs entirely on the CPU, because Wasm is a portable abstraction of CPUs, as Google’s Chrome team (2024) puts it. Within that CPU, the Wasm specification exposes only a subset of the hardware’s instructions.

SIMD width. The WebAssembly SIMD specification defines only 128-bit SIMD instructions, while modern x86-64 CPUs offer up to 512-bit SIMD through AVX-512. In an HPC study by Chadha et al. (2023), the gap between Wasm and native performance on the DT benchmark was attributed to this 128-bit limit. SIMD still matters inside that limit: the Wasm build with SIMD delivered 1.36× the throughput of the Wasm build without it. A proposal for flexible vectors wider than 128 bits exists but is not part of the current SIMD specification. Native code reaches the 512-bit AVX-512 instructions directly; see our guide to GCC -march and SIMD flags for native builds. More generally, the Chrome team notes that the Wasm specification exposes a fixed instruction set while hardware keeps adding instructions, which widens the gap between native and Wasm performance over time.

Semantics and missing instructions. Emscripten’s documentation warns that semantic differences between host hardware and WebAssembly SIMD semantics “sometimes will lead to poor performance”. The Relaxed SIMD proposal loosens some of the strict determinism requirements and adds dot-product and FMA instructions. Google’s Chrome team reports that these speed up existing workloads by 1.5-3×.

Threading. WebAssembly programs can spread work across cores through the threads proposal, which lets several Wasm instances in separate web workers share one WebAssembly.Memory. Pyodide does not support threading or multiprocessing, so Python packages that rely on them need a patch to disable it. Pyodide’s own documentation shows code that falls back to n_threads = 1 when threads cannot start.

The gap between plain and tuned WASM is large. TensorFlow’s team (2020) measured SIMD bringing a 1.7-4.5× improvement over plain Wasm in the TensorFlow.js backend, and multithreading adding a further 1.8-2.9× on top. At scale the overhead is smaller but still there: Chadha et al. observed a 14% reduction in GFLOP/s with 6,144 MPI processes under MPI-Wasm. In Emscripten, SIMD is enabled by passing the -msimd128 flag at compile time. For the wider set, see the Emscripten flags that change inference latency.

When Does a Workload Become Memory-Bandwidth-Bound Rather than GFLOPS-Bound?

A workload is memory-bandwidth-bound when it does too few floating-point operations per byte moved to keep the arithmetic units busy. The roofline model formalises this: it bounds a kernel’s performance using the kernel’s operational intensity (FLOPs per byte) together with the system’s peak compute throughput and memory bandwidth. Below a certain intensity, bandwidth sets the ceiling. Above it, GFLOPS does.

That crossover can be computed for a real CPU. The Ridgeline paper (2022) cites an Intel Xeon Cascade Lake node with 4.2 TF/s FP32 capacity and 105 GB/s memory bandwidth. Dividing one by the other gives a ridge of 40 FLOPs per byte (4.2 × 10¹² ÷ 105 × 10⁹), so any kernel doing fewer than 40 FP32 operations per byte of memory traffic cannot reach that node’s compute peak, however well it vectorises. The same reasoning on an NVIDIA A100 gives a ratio of 208 in kipply’s transformer inference arithmetic. In that worked example, computing for fewer tokens than that ratio leaves the GPU bound by memory bandwidth, and more tokens make it bound by FLOPs.

For inference, the bound depends on the phase. AMD’s ROCm team describes the prefill phase of generative inference as large-matrix work sensitive to achievable FLOPs, and the autoregressive decode phase as sensitive to memory bandwidth. Decode is memory-bound because requests in a batch share the same weight matrix and need only one memory access, which is why batching raises decode throughput with little added latency. Kipply’s model puts the same point in terms of what grows: FLOPs grow with batch size and parameter count, memory traffic only with parameter count. In kipply’s model, token generation at batch size 1 is memory-bandwidth-bound. McCalpin argues that because CPUs are getting faster more quickly than memory systems, more and more programs will be limited by bandwidth rather than computation.

How Does GFLOPS Relate to a Model’s FLOPs-per-Inference When You Estimate Latency?

The lowest latency compute alone allows is the model’s FLOPs per inference divided by the throughput the runtime actually achieves. The roofline adds a second floor from memory, and the binding floor is whichever is higher. The Ridgeline authors state the rule directly: if memory is the binding resource, runtime is memory traffic divided by bandwidth, and if compute is binding, runtime is total FLOPs divided by the hardware’s FLOP capacity. For a transformer, kipply’s arithmetic gives about 2P FLOPs per generated token for P parameters, since a matrix-vector product costs 2mn operations. At small batch sizes the memory term is set by passing every parameter through memory once, so 2P bytes at two bytes per parameter.

A latency budget built this way runs in order:

  1. Take the model’s FLOPs per inference, and its bytes of weights and activations moved per inference.
  2. Measure achieved GFLOPS on the target device under the target runtime (a GEMM at your model’s shapes, not a vendor peak).
  3. Measure achieved bandwidth on the same device, for example with a STREAM-style kernel, since STREAM measures sustainable memory bandwidth.
  4. Compute the compute floor (FLOPs ÷ achieved FLOP/s) and the memory floor (bytes ÷ achieved bandwidth), and take the larger.
  5. Add the fixed costs that neither floor captures: runtime startup, first-call library initialisation and, for Pyodide, environment load, which the Pyodide roadmap puts at a 6.4 MB first download and 4 to 5 seconds of initialisation.

Here is the arithmetic with the worked-example ceiling. A hypothetical model needing 1 GFLOP per inference on the 25.6 GFLOPS single-thread WASM ceiling has a compute floor of about 39 ms (1 ÷ 25.6) before any overhead. That figure is a floor, and Wasm overhead pushes the real number higher. Jangda et al. (USENIX ATC 2019) measured applications compiled to WebAssembly running an average of 45% (Firefox) to 55% (Chrome) slower than native across SPEC CPU, with peak slowdowns of 2.08× and 2.5×. That range is the measured overhead for compiled SPEC CPU applications, not a SPECfp benchmark score. The compiler and code-generation causes are a separate topic.

Python code adds its own factor. The Pyodide roadmap reports Python code in Pyodide running about 3× to 5× slower than native Python across its benchmarks. That figure describes Python code in Pyodide, not compiled C code. If the model’s heavy lifting happens in compiled kernels and Python is only glue, the compiled-code range applies to most of the FLOPs and the interpreter factor applies to the glue. The roadmap also notes that scientific Python in Pyodide would benefit from packaging a high-performance BLAS library such as BLIS. Which BLAS is underneath decides how close a matrix multiply gets to the WASM ceiling at all.

Why Does CPU GFLOPS Matter When You Profile Pyodide Against a Native Build?

CPU GFLOPS gives both runs a common ceiling, which is what makes the comparison readable. Without a ceiling, “Pyodide is three times slower” says nothing about where the time went. With one, you can tell whether the WASM path is compute-bound and close to its narrowed peak, bandwidth-bound at the same roof as native, or losing time somewhere neither roofline explains, such as interpreter overhead, initialisation or data copies across the JavaScript boundary. Each answer leads to a different fix: wider or relaxed SIMD and threads for the first, smaller or quantised weights for the second, and moving work out of Python for the third.

Profile in this order: measure native achieved GFLOPS and bandwidth, measure the same kernels under WASM, then time the full inference under Pyodide. The gap between each pair of steps then has a single cause. Sustained throughput has to be profiled, not taken on trust from a peak specification. A GFLOPS baseline of this kind feeds the profiling pass TechnoLynx uses in a Pyodide fit assessment to judge whether the WASM path moves the bottleneck or simply hides it. TechnoLynx delivers that work through its GPU performance engineering practice, covering kernels, memory and profiling. A sustained-throughput latency ceiling also works as a gate before shipping any inference path, browser paths included, which is the approach in our release-readiness decision framework for AI features.

Two questions are left once the numbers are in. Is the latency target achievable under the narrowed WASM ceiling at all? And if it is only achievable with threads, SIMD and a fast BLAS, is that build effort worth more than running the model somewhere native? The ceiling arithmetic answers the first. The second is a judgement about the product, and the profile is what makes it an informed one.

FAQ

Does 4 Cores Mean 4 Processors?

No: four cores are four execution units, each able to carry out instructions independently and concurrently. For peak GFLOPS, the core count is the multiplier that matters, provided the runtime can actually use all of them.