PHI

PERFORMANCE BENCHMARKS

Updated Sep 14, 8:18 AM
Benchmark Env

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

SQLITE READS
140,016 ops/s
FindUnique peak throughput on SQLITE.
SQLITE LATENCY
0.007 ms/op
FindUnique latency (vs Ent 0.019ms & GORM 0.018ms).
MEMORY / QUERY
1.9KB/op
vs GORM (5.4KB) & Ent (5.5KB).
CREATE MANY
15,610 ops/s
Batch insert (vs Ent 10.1k/s & GORM 8.1k/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
75,517 ops/s
Phi3rd
59,000 ops/s
Bun4th
35,207 ops/s
Ent2nd
65,505 ops/s
GORM5th
28,188 ops/s

CreateMany

5 ORMs tested
Raw2nd
14,828 ops/s
Phi1st
15,610 ops/s
Bun3rd
10,942 ops/s
Ent4th
10,147 ops/s
GORM5th
8,102 ops/s

CreateManyAndReturn

5 ORMs tested
Raw2nd
10,746 ops/s
Phi1st
10,915 ops/s
Bun4th
9,345 ops/s
Ent3rd
10,422 ops/s
GORM5th
8,170 ops/s

CreateManyAndReturnWithDeepSelect

5 ORMs tested
Raw2nd
5,978 ops/s
Phi1st
6,386 ops/s
Bun4th
3,700 ops/s
Ent3rd
4,972 ops/s
GORM5th
3,322 ops/s

CreateWithDeepSelect

5 ORMs tested
Raw1st
38,942 ops/s
Phi2nd
21,471 ops/s
Bun4th
16,835 ops/s
Ent3rd
19,005 ops/s
GORM5th
10,995 ops/s

Delete

5 ORMs tested
Raw1st
522 ops/s
Phi2nd
522 ops/s
Bun3rd
517 ops/s
Ent5th
246 ops/s
GORM4th
511 ops/s

FindFirst

5 ORMs tested
Raw2nd
94,295 ops/s
Phi1st
133,280 ops/s
Bun3rd
70,333 ops/s
Ent5th
53,239 ops/s
GORM4th
57,093 ops/s

FindMany

5 ORMs tested
Raw2nd
25,287 ops/s
Phi1st
34,716 ops/s
Bun4th
20,899 ops/s
Ent3rd
25,073 ops/s
GORM5th
16,461 ops/s

FindUnique

5 ORMs tested
Raw2nd
96,033 ops/s
Phi1st
140,016 ops/s
Bun3rd
72,004 ops/s
Ent5th
53,098 ops/s
GORM4th
57,038 ops/s

FindUniqueSelfRef2L

5 ORMs tested
Raw2nd
33,832 ops/s
Phi1st
51,706 ops/s
Bun3rd
23,789 ops/s
Ent4th
17,500 ops/s
GORM5th
15,352 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
70,145 ops/s
Phi2nd
58,343 ops/s
Bun3rd
34,529 ops/s
Ent5th
11,785 ops/s
GORM4th
23,796 ops/s

UpsertWithDeepSelect

5 ORMs tested
Raw2nd
18,259 ops/s
Phi1st
18,653 ops/s
Bun3rd
11,864 ops/s
Ent5th
4,620 ops/s
GORM4th
6,188 ops/s