phpser benchmarks

A decoder-optimized binary serializer for read-heavy PHP cache workloads, measured against igbinary (the reference), PHP's native serialize(), and msgpack across cache-shaped payloads. Lower is better on every metric. igbinary is the baseline; each percentage is that column's delta vs. igbinary: green beats igbinary, red loses to it.

PHP 8.4.23 arch aarch64 os Linux 6.17.0-1010-oracle iters 1000 median of 7 phpser 0.5.0 igbinary 3.2.16 msgpack 3.0.1 date 2026-08-02

Bars are normalized per row to the largest value (longer = slower / bigger).best in rowphpser column

SIZEbytes; lower is better

shape phpser igbinary * serialize msgpack
rowset_100
2,592
-43%
4,570
21,046
+361%
9,593
+110%
rowset_1000
25,993
-45%
47,459
214,949
+353%
98,509
+108%
rowset_distinct_1000
25,993
-56%
59,447
214,949
+262%
98,509
+66%
packed_1k
7
-100%
5,495
11,789
+115%
2,619
-52%
packed_10k
7
-100%
59,495
137,790
+132%
29,619
-50%
packed_rand_10k
29,826
-62%
78,389
157,762
+101%
48,637
-38%
deep_50
424
+1%
419
1,512
+261%
457
+9%
dto_100
5,506
-22%
7,083
28,190
+298%
14,909
+110%
dto_1000
56,807
-23%
73,372
285,891
+290%
152,725
+108%
dto_mixed
14,320
-34%
21,644
85,395
+295%
46,433
+115%

ENCODEns / op; lower is better

shape phpser igbinary * serialize msgpack
rowset_100
10.9k
-40%
18.0k
64.4k
+257%
38.8k
+115%
rowset_1000
107.6k
-58%
256.5k
698.1k
+172%
401.5k
+56%
rowset_distinct_1000
122.8k
-63%
329.7k
700.0k
+112%
413.6k
+25%
packed_1k
1.5k
-84%
9.6k
23.4k
+143%
12.7k
+32%
packed_10k
14.5k
-85%
93.5k
246.8k
+164%
130.2k
+39%
packed_rand_10k
74.2k
-29%
104.9k
294.3k
+181%
135.6k
+29%
deep_50
1.9k
-31%
2.8k
3.1k
+13%
6.7k
+141%
dto_100
24.7k
-12%
28.1k
37.0k
+31%
47.2k
+68%
dto_1000
275.3k
-12%
314.4k
366.2k
+16%
505.8k
+61%
dto_mixed
87.9k
-20%
109.5k
209.0k
+91%
166.6k
+52%

DECODEns / op; lower is better

shape phpser igbinary * serialize msgpack
rowset_100
12.5k
-43%
21.9k
70.5k
+222%
68.0k
+210%
rowset_1000
148.5k
-34%
225.2k
763.4k
+239%
731.6k
+225%
rowset_distinct_1000
150.8k
-52%
315.8k
770.2k
+144%
740.5k
+134%
packed_1k
1.4k
-91%
16.3k
40.1k
+146%
17.7k
+9%
packed_10k
12.7k
-92%
162.1k
428.0k
+164%
177.6k
+10%
packed_rand_10k
47.0k
-74%
180.7k
465.2k
+157%
183.9k
+2%
deep_50
2.7k
-24%
3.6k
6.2k
+72%
7.3k
+104%
dto_100
26.6k
-53%
56.7k
128.2k
+126%
156.5k
+176%
dto_1000
275.7k
-56%
631.6k
1654.8k
+162%
1659.4k
+163%
dto_mixed
89.2k
-63%
240.5k
550.5k
+129%
574.4k
+139%