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.22 arch aarch64 os Linux 6.17.0-1010-oracle iters 1000 median of 35 phpser 0.4.0 igbinary 3.2.16 msgpack 3.0.1 date 2026-07-15

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,727
-40%
4,570
21,046
+361%
9,593
+110%
rowset_1000
27,928
-41%
47,459
214,949
+353%
98,509
+108%
rowset_distinct_1000
27,928
-53%
59,447
214,949
+262%
98,509
+66%
packed_1k
1,941
-65%
5,495
11,789
+115%
2,619
-52%
packed_10k
21,749
-63%
59,495
137,790
+132%
29,619
-50%
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
11.2k
-37%
17.8k
63.8k
+258%
39.5k
+122%
rowset_1000
113.0k
-56%
254.9k
682.3k
+168%
401.5k
+58%
rowset_distinct_1000
122.5k
-63%
329.4k
691.9k
+110%
407.8k
+24%
packed_1k
2.4k
-76%
9.7k
23.3k
+140%
12.6k
+30%
packed_10k
24.6k
-74%
93.3k
250.5k
+168%
128.8k
+38%
deep_50
1.9k
-31%
2.7k
3.1k
+14%
6.7k
+145%
dto_100
27.2k
-2%
27.9k
35.9k
+29%
47.9k
+72%
dto_1000
302.9k
-4%
316.2k
370.6k
+17%
525.8k
+66%
dto_mixed
88.9k
-18%
108.2k
209.1k
+93%
163.8k
+51%

DECODEns / op; lower is better

shape phpser igbinary * serialize msgpack
rowset_100
15.0k
-31%
21.8k
71.2k
+227%
67.9k
+212%
rowset_1000
177.5k
-21%
224.4k
766.2k
+241%
726.3k
+224%
rowset_distinct_1000
173.8k
-44%
308.3k
773.4k
+151%
731.9k
+137%
packed_1k
3.5k
-79%
16.2k
40.1k
+147%
17.7k
+9%
packed_10k
36.6k
-77%
161.6k
426.9k
+164%
177.5k
+10%
deep_50
2.7k
-24%
3.6k
6.4k
+77%
7.3k
+102%
dto_100
30.2k
-46%
56.5k
126.7k
+124%
155.3k
+175%
dto_1000
307.5k
-51%
629.0k
1646.8k
+162%
1634.8k
+160%
dto_mixed
103.2k
-56%
234.2k
539.5k
+130%
566.4k
+142%