PHI

PERFORMANCE BENCHMARKS

Updated Nov 16, 10:24 AM
Benchmark Env

Real-world benchmark suite comparing Phi against Raw SQL, GORM, Ent, and Bun under identical workloads.

SQLITE READS
176,429 ops/s
FindUnique peak throughput on SQLITE.
SQLITE LATENCY
0.006 ms/op
FindUnique latency (vs Ent 0.016ms & GORM 0.014ms).
MEMORY / QUERY
1.9KB/op
vs GORM (5.4KB) & Ent (5.5KB).
CREATE MANY
20,882 ops/s
Batch insert (vs Ent 13.5k/s & GORM 10.7k/s).
RELATIONAL PRELOADING (ReadDeepRelation)
44,680 ops/s
Raw: 29.3k/sBun: 18.7k/sGORM: 10.5k/sEnt: 14.0k/s
Phi ranks 1st on ReadDeepRelation preloading on SQLITE (44.7k/s vs Raw 29.3k/s, Bun 18.7k/s, GORM 10.5k/s, Ent 14.0k/s).
READ ALLOCATIONS (FindUnique)
58 allocs/op
Raw: 49/opBun: 53/opGORM: 96/opEnt: 145/op
Zero-reflection query building keeps FindUnique allocations down to 58/op on SQLITE (vs Raw 49, Bun 53, GORM 96, Ent 145).
Showing: Throughput (ops/sec) - Higher is betterTarget Database: sqlite

Create

5 ORMs tested
Raw1st
103,896 ops/s
Phi3rd
78,542 ops/s
Bun4th
48,482 ops/s
Ent2nd
91,282 ops/s
GORM5th
40,298 ops/s

CreateMany

5 ORMs tested
Raw2nd
19,416 ops/s
Phi1st
20,882 ops/s
Bun3rd
13,989 ops/s
Ent4th
13,504 ops/s
GORM5th
10,679 ops/s

CreateManyAndReturn

5 ORMs tested
Raw2nd
13,950 ops/s
Phi1st
14,105 ops/s
Bun4th
12,089 ops/s
Ent3rd
13,370 ops/s
GORM5th
10,722 ops/s

CreateManyAndReturnWithDeepSelect

5 ORMs tested
Raw1st
7,702 ops/s
Phi2nd
7,669 ops/s
Bun4th
4,672 ops/s
Ent3rd
6,072 ops/s
GORM5th
4,242 ops/s

CreateWithDeepSelect

5 ORMs tested
Raw1st
51,808 ops/s
Phi2nd
31,788 ops/s
Bun4th
21,633 ops/s
Ent3rd
24,657 ops/s
GORM5th
14,970 ops/s

Delete

5 ORMs tested
Raw3rd
612 ops/s
Phi4th
603 ops/s
Bun2nd
614 ops/s
Ent5th
301 ops/s
GORM1st
623 ops/s

FindFirst

5 ORMs tested
Raw2nd
119,990 ops/s
Phi1st
171,115 ops/s
Bun3rd
87,619 ops/s
Ent5th
65,971 ops/s
GORM4th
70,626 ops/s

FindMany

5 ORMs tested
Raw2nd
32,367 ops/s
Phi1st
44,567 ops/s
Bun4th
26,879 ops/s
Ent3rd
32,114 ops/s
GORM5th
20,410 ops/s

FindUnique

5 ORMs tested
Raw2nd
123,167 ops/s
Phi1st
176,429 ops/s
Bun3rd
91,124 ops/s
Ent5th
64,254 ops/s
GORM4th
73,329 ops/s

FindUniqueSelfRef2L

5 ORMs tested
Raw2nd
43,250 ops/s
Phi1st
66,595 ops/s
Bun3rd
30,361 ops/s
Ent4th
21,828 ops/s
GORM5th
19,201 ops/s

ReadDeepRelation

5 ORMs tested
Raw2nd
29,264 ops/s
Phi1st
44,680 ops/s
Bun3rd
18,726 ops/s
Ent4th
13,965 ops/s
GORM5th
10,546 ops/s

Upsert

5 ORMs tested
Raw1st
90,342 ops/s
Phi2nd
74,833 ops/s
Bun3rd
42,940 ops/s
Ent5th
14,721 ops/s
GORM4th
30,348 ops/s

UpsertWithDeepSelect

5 ORMs tested
Raw2nd
22,676 ops/s
Phi1st
25,312 ops/s
Bun3rd
13,924 ops/s
Ent5th
5,560 ops/s
GORM4th
7,921 ops/s