Performance
Measured against matplotlib (Python) and the Rust libraries plotters, ruviz, kuva and charts-rs: the same charts, separate processes, medians (Intel(R) Core(TM) Ultra 7 255HX, NVIDIA GeForce RTX 5070 Ti Laptop GPU, Linux). Full results, method and the code to rerun them: dataviz-examples/benchmarks.
Compared with matplotlib: 8–53× faster for charts saved to PNG, 28× faster for a live 100 000-point chart, and 178× less memory for 10 M points.
Charts to an 800×600 PNG (one thread, time per chart):
| Chart | dataviz | plotters | ruviz | kuva | charts-rs | matplotlib |
|---|---|---|---|---|---|---|
| line, 1 000 points | 1.50 ms | 1.66 ms | 3.60 ms | 4.98 ms | 11.1 ms | 29.3 ms |
| bar, 20 bars | 0.79 ms | 0.83 ms | 3.90 ms | 3.55 ms | 2.08 ms | 41.8 ms |
| scatter, 10 000 points | 2.12 ms | 2.83 ms | 4.37 ms | 8.53 ms | 76.2 ms | 37.5 ms |
| scatter, 100 000 points | 9.88 ms | 16.6 ms | 16.9 ms | 17.4 ms | 784.5 ms | 81.8 ms |
| line, 100 000 points | 2.17 ms | 5.91 ms | 8.39 ms | 28.2 ms | 829.7 ms | 50.2 ms |
| histogram, 1 M values | 2.06 ms | 2.76 ms | 30.2 ms | 16.1 ms | 12.8 ms | 49.6 ms |
Big data (time / memory above the data itself):
| Chart | dataviz | dataviz all cores | plotters | ruviz | kuva | charts-rs | matplotlib |
|---|---|---|---|---|---|---|---|
| line, 10 M points | 129.0 ms / +7 MB | 103.1 ms / +6 MB | 481.9 ms / +315 MB | 332.5 ms / +389 MB | 2.70 s / +787 MB | fails | 533.1 ms / +1162 MB |
| scatter, 10 M points | 230.3 ms / +8 MB | 181.6 ms / +7 MB | 1.53 s / +12 MB | 1.23 s / +376 MB | 1.56 s / +788 MB | fails | 5.08 s / +910 MB |
| histogram, 100 M values | 243.5 ms / +7 MB | 235.2 ms / +6 MB | 264.6 ms / +12 MB | 3.64 s / +1915 MB | 1.64 s / +1551 MB | 1.23 s / +1533 MB | 516.6 ms / +13 MB |
Live chart (rolling window, one new point and a full redraw per frame; latency p50 / CPU per frame / memory of the process):
| Window | dataviz 1 thread | dataviz all cores | dataviz GPU | plotters | ruviz | kuva | matplotlib |
|---|---|---|---|---|---|---|---|
| 1 000 points, 800×600 | 0.77 ms / 0.77 ms / 7 MB | 0.49 ms / 2.57 ms / 8 MB | 0.67 ms / 0.47 ms / 214 MB | 0.65 ms / 0.63 ms / 14 MB | 4.66 ms / 4.67 ms / 11 MB | 5.26 ms / 5.23 ms / 27 MB | 10.1 ms / 10.1 ms / 73 MB |
| 100 000 points, 800×600 | 2.20 ms / 2.17 ms / 12 MB | 2.02 ms / 4.67 ms / 13 MB | 2.04 ms / 1.63 ms / 219 MB | 5.40 ms / 5.37 ms / 16 MB | 34.6 ms / 34.6 ms / 17 MB | 47.0 ms / 47.1 ms / 36 MB | 62.0 ms / 62.0 ms / 112 MB |
| 1 000 points, 1920×1080 | 1.69 ms / 1.70 ms / 15 MB | 0.77 ms / 5.83 ms / 17 MB | 1.39 ms / 1.23 ms / 221 MB | 1.48 ms / 1.50 ms / 18 MB | 17.4 ms / 17.4 ms / 18 MB | 18.0 ms / 18.0 ms / 33 MB | 12.4 ms / 12.6 ms / 79 MB |
| 100 000 points, 1920×1080 | 5.51 ms / 5.53 ms / 18 MB | 3.25 ms / 14.1 ms / 20 MB | 2.70 ms / 2.53 ms / 225 MB | 8.43 ms / 8.43 ms / 21 MB | 119.9 ms / 119.9 ms / 28 MB | 115.8 ms / 115.8 ms / 42 MB | 136.8 ms / 136.8 ms / 177 MB |
Animated GIF (800×600, 120 frames; time, file size):
| Animation | dataviz | plotters | ruviz | matplotlib |
|---|---|---|---|---|
| whole plot moves | 282.0 ms, 1001 KB | 1.09 s, 3227 KB | 3.00 s, 1741 KB | 5.24 s, 1119 KB |
| line grows on fixed axes | 81.0 ms, 38 KB | 2.40 s, 3257 KB | 2.91 s, 1701 KB | 5.75 s, 420 KB |
3D charts (800×600 PNG; dataviz, plotters and matplotlib on one core, PyVista on the GPU; a rotation frame is the camera turned and the image drawn again):
| Chart | dataviz | dataviz GPU | plotters | matplotlib | PyVista |
|---|---|---|---|---|---|
| surface 60² | 6.34 ms | 2.37 ms | 6.05 ms | 57.0 ms | 93.7 ms |
| surface 200² | 29.9 ms | 5.41 ms | 21.3 ms | 146.2 ms | 101.0 ms |
| scatter 10,000 | 2.81 ms | 2.00 ms | 3.19 ms | 96.3 ms | 89.2 ms |
| scatter 1,000,000 | 147.0 ms | 39.9 ms | 170.3 ms | 5.71 s | 119.2 ms |
| line 100,000 (Lorenz) | 9.93 ms | 3.79 ms | 8.41 ms | 59.3 ms | 87.8 ms |
| molecule 1BNA (486 atoms) | 3.35 ms | 2.31 ms | 1.91 ms | 37.6 ms | 82.1 ms |
| rotation frame: surface 60² | 5.10 ms | 0.45 ms | 4.98 ms | 25.0 ms | 0.55 ms |
| rotation frame: molecule | 2.13 ms | 0.46 ms | 0.88 ms | 11.4 ms | 0.61 ms |
| GIF, 90 frames turning | 885.7 ms, 3949 KB | 665.9 ms, 3453 KB | 2.80 s, 4544 KB | 7.38 s, 5713 KB | 4.14 s, 3441 KB |
What makes it fast: the scene is drawn straight into the output buffer by dataviz’s own anti-aliased rasterizer; dense lines become one pixel-column envelope and dense scatter plots an occupancy grid, so time and memory stay flat as the data grows; data passed to a series is not copied; glyphs and markers are cached as bitmaps; histograms use SIMD binning. Animations store only the changed part of each frame. On the web the same renderer compiled to WebAssembly draws a 960×520 live chart with 2 × 3 000 points in about 1.7 ms.
In 3D dataviz is 35–52× faster than matplotlib for scatter plots, 5–23× for surfaces and 4–9× for lines, molecules and rotation frames; it draws a turning GIF 3.2× faster than plotters and 7.4× faster than PyVista and is first (on the CPU or the GPU) for both surfaces and for scatter plots up to a million points, with lighting, depth order and anti-aliasing. plotters is faster for the long 3D line and the molecule: it draws 1-pixel lines and flat circles without depth sorting or lighting, while dataviz shades every atom as a lit sphere. PyVista (VTK) keeps the scene on the GPU and turns it in 0.6 ms per frame against dataviz’s 2–5 ms (still 200–500 frames per second), but needs 80–100 ms to save an image and about 280 MB of memory.
Where it is not first: for a tiny live chart (1 000 points) on a single thread plotters is 0.1–0.2 ms faster per frame; dataviz on all cores is the fastest there. The GPU backend needs the least CPU time but ~240 MB of driver memory and ~0.3 s to start, so the default stays on the CPU.