phiz

Benchmarks

Workloads

Specification building

Static export

Specification building

Large-data binning

Results

Binning of one million (x, y) points from a phibble table into hexagons, rectangles, or a histogram, and encoding of the specification as JSON. Only the bins are embedded.

Workload
Large-data binning, 1,000,000 rows, 2 numeric columns
Dataset
1,000,000 rows

Large-data binning, 1,000,000 rows, 2 numeric columns: elapsed time, peak anonymous memory, peak resident set size, and PHP allocator peak per implementation and case, median of 7 runs.

hex(bins: 40)

hex(bins: 40): elapsed time and memory by implementation
Implementation Elapsed time Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz61 KB specification. 1.67 s 1.67 s – 1.68 s 59.8 MiB 82.9 MiB 56.0 MiB

bin2d(bins: 50)

bin2d(bins: 50): elapsed time and memory by implementation
Implementation Elapsed time Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz168 KB specification. 1.31 s 1.31 s – 1.31 s 60.4 MiB 83.4 MiB 56.0 MiB

histogram(bins: 60)

histogram(bins: 60): elapsed time and memory by implementation
Implementation Elapsed time Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz6 KB specification. 804 ms 803 ms – 807 ms 58.9 MiB 81.9 MiB 56.0 MiB

Methods

Implementations
phiz: phiz v0.5.2-9-g760c476, plain PHP, reading a phibble v0.6.1 table
Machine
2 AMD Zen 5 cores, 7.8 GB RAM, Linux
Software
PHP 8.5.12, phibble v0.6.1
Threads
1
Repetitions
7 timed runs, 0 warm-up runs
Statistic
Median over the timed runs
Time measure
Elapsed time, in s
Timing boundaries
Timed from building the Plot to holding the JSON specification: compilation, columnar reads, binning, and encoding. Table generation and PHP startup excluded.
Time spent in
The PHP process; specification building only, without browser rendering or vl-convert.
Cache
Warm
Memory metric
Peak anonymous memory; Peak resident set size; PHP allocator peak. Peak anonymous memory (RssAnon) of the whole PHP process, including the generated table, sampled every millisecond by peakmem (phpolars bench/csv-pipeline/peakmem.c). Also reported: peak resident set size, and PHP allocator peak (memory_get_peak_usage(true)).
Recorded
2026-11-01, commit 760c476

Reproduction

From the repository root
composer install
php scripts/bench-large-data.php
Raw record
site/benchmarks/large-data-binning.json
Source
scripts/bench-large-data.php

Small plots

Results

Building of an ordinary plot from a bundled dataset and encoding of its specification as JSON, as for each chart a page serves.

Workload
Small plots, 234 to 574 inline rows

Small plots, 234 to 574 inline rows: elapsed time per plot, peak anonymous memory, peak resident set size, and PHP allocator peak per implementation and case, median of 7 runs.

scatter, 234 rows

scatter, 234 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz35.1 KB specification. 0.367 ms 0.365 ms – 0.368 ms 12.6 MiB 35.6 MiB 8.00 MiB

scatter with lm band, 234 rows

scatter with lm band, 234 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz52.4 KB specification. 0.881 ms 0.880 ms – 0.882 ms 12.6 MiB 35.6 MiB 8.00 MiB

scatter with loess band, 234 rows

scatter with loess band, 234 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz52.4 KB specification. 66.5 ms 66.5 ms – 66.6 ms 16.6 MiB 39.8 MiB 12.0 MiB

histogram, 272 rows

histogram, 272 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz8.8 KB specification. 0.123 ms 0.122 ms – 0.124 ms 12.4 MiB 35.2 MiB 6.00 MiB

time series, 574 rows

time series, 574 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz52.1 KB specification. 0.631 ms 0.630 ms – 0.632 ms 12.9 MiB 35.8 MiB 8.00 MiB

facets, 7 panels, 234 rows

facets, 7 panels, 234 rows: elapsed time per plot and memory by implementation
Implementation Elapsed time per plot Fastest – slowest run Peak anonymous memory Peak resident set size PHP allocator peak
phiz35.1 KB specification. 0.410 ms 0.409 ms – 0.411 ms 12.6 MiB 35.4 MiB 8.00 MiB

Methods

Implementations
phiz: phiz v0.5.2-9-g760c476, plain PHP
Machine
2 AMD Zen 5 cores, 7.8 GB RAM, Linux
Software
PHP 8.5.12
Threads
1
Repetitions
7 timed runs, 1 warm-up run
Statistic
Median over the timed runs
Time measure
Elapsed time per plot, in ms
Timing boundaries
Mean time per plot over 100 builds and encodings per run. One warmup run. Dataset loading and PHP startup excluded.
Time spent in
The PHP process; specification building only, without browser rendering or vl-convert.
Cache
Warm
Memory metric
Peak anonymous memory; Peak resident set size; PHP allocator peak. Peak anonymous memory (RssAnon) of the whole PHP process, sampled every millisecond by peakmem (phpolars bench/csv-pipeline/peakmem.c). Also reported: peak resident set size, and PHP allocator peak (memory_get_peak_usage(true)).
Recorded
2026-11-01, commit 760c476

Reproduction

From the repository root
composer install
php scripts/bench-build.php
Raw record
site/benchmarks/small-plot-build.json
Source
scripts/bench-build.php

Static export

vl-convert export

Results

Export of a plot with svg(), png(scale: 2), or pdf(). phiz builds the specification and runs vl-convert, which renders it without a browser.

Workload
vl-convert export, a 234-point scatterplot with a least-squares band and a 20,000-point scatterplot

vl-convert export, a 234-point scatterplot with a least-squares band and a 20,000-point scatterplot: elapsed time per export, peak anonymous memory, PHP allocator peak, and peak resident set size of child processes per implementation and case, median of 7 runs.

234 points with lm band: SVG

234 points with lm band: SVG: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert71 KB output; building the 52 KB specification in PHP took 0.609 ms. 314 ms 303 ms – 326 ms 13.1 MiB 8.00 MiB 77.9 MiB

234 points with lm band: PNG, scale 2

234 points with lm band: PNG, scale 2: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert149 KB output; building the 52 KB specification in PHP took 0.606 ms. 334 ms 324 ms – 335 ms 13.2 MiB 8.00 MiB 80.8 MiB

234 points with lm band: PDF

234 points with lm band: PDF: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert173 KB output; building the 52 KB specification in PHP took 0.61 ms. 315 ms 313 ms – 326 ms 13.1 MiB 8.00 MiB 79.3 MiB

20,000 points: SVG

20,000 points: SVG: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert5498 KB output; building the 948 KB specification in PHP took 12.3 ms. 523 ms 511 ms – 532 ms 33.4 MiB 27.4 MiB 177 MiB

20,000 points: PNG, scale 2

20,000 points: PNG, scale 2: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert834 KB output; building the 948 KB specification in PHP took 12.3 ms. 1.09 s 1.08 s – 1.10 s 28.1 MiB 22.0 MiB 198 MiB

20,000 points: PDF

20,000 points: PDF: elapsed time per export and memory by implementation
Implementation Elapsed time per export Fastest – slowest run Peak anonymous memory PHP allocator peak Peak resident set size of child processes
phiz + vl-convert13780 KB output; building the 948 KB specification in PHP took 12.3 ms. 896 ms 877 ms – 899 ms 41.5 MiB 35.5 MiB 212 MiB

Methods

Implementations
phiz + vl-convert: phiz v0.5.2-9-g760c476, running vl-convert 1.9.0 once per export
Machine
2 AMD Zen 5 cores, 7.8 GB RAM, Linux
Software
PHP 8.5.12, vl-convert 1.9.0
Threads
1
Repetitions
7 timed runs, 1 warm-up run
Statistic
Median over the timed runs
Time measure
Elapsed time per export, in ms
Timing boundaries
Timed from the export call to holding the output bytes: specification building in PHP, vl-convert startup, rendering, and output reading. One warmup export. Data generation and PHP startup excluded.
Time spent in
vl-convert, launched by phiz once per export. Specification building in the PHP process is given in each row's note.
Cache
Warm
Memory metric
Peak anonymous memory; PHP allocator peak; Peak resident set size of child processes. Peak anonymous memory (RssAnon) of the PHP process alone, sampled every millisecond by peakmem (phpolars bench/csv-pipeline/peakmem.c). Also reported: the largest vl-convert process's peak resident set size, from getrusage(RUSAGE_CHILDREN), and PHP allocator peak (memory_get_peak_usage(true)).
Recorded
2026-11-01, commit 760c476

Reproduction

From the repository root
composer install
PHIZ_VL_CONVERT=/path/to/vl-convert php scripts/bench-export.php
Raw record
site/benchmarks/vl-convert-export.json
Source
scripts/bench-export.php

Not measured

No benchmark measures how long the browser takes to draw a chart with vega-embed.