- Node.js Version: v22.14.0
- Platform: macOS (darwin)
- Architecture: x64
- Database: SQLite
- Test Data: 1000 users per bulk operation, 100 users per individual operation
- Iterations: 5 per ORM
TypeORM consistently performed the best across all operations, particularly excelling in:
- Bulk Insert: 18.67ms average (fastest)
- Select Operations: 9.76ms for select all, 6.23ms for filtered queries
- Complex Queries: 0.67ms average (fastest)
Prisma showed strong performance in:
- Bulk Insert: 89.56ms average
- Update Operations: 9.09ms average
- Complex Queries: 1.42ms average
Sequelize performed well in:
- Delete Operations: 7.92ms average
- Update Operations: 10.06ms average
Objection.js had the slowest bulk insert performance (5369.22ms) due to SQLite limitations, but performed well in individual operations.
- TypeORM: 18.67ms (🥇)
- Prisma: 89.56ms (🥈)
- Sequelize: 106.76ms (🥉)
- Objection.js: 5369.22ms
Note: Objection.js bulk insert is slow because SQLite doesn't support batch inserts, so it falls back to individual inserts.
- TypeORM: 368.60ms (🥇)
- Objection.js: 500.50ms (🥈)
- Prisma: 578.52ms (🥉)
- Sequelize: 584.67ms
- TypeORM: 9.76ms (🥇)
- Objection.js: 11.92ms (🥈)
- Prisma: 26.38ms (🥉)
- Sequelize: 29.00ms
- TypeORM: 6.23ms (🥇)
- Objection.js: 7.32ms (🥈)
- Prisma: 16.26ms (🥉)
- Sequelize: 18.12ms
- TypeORM: 6.95ms (🥇)
- Prisma: 9.09ms (🥈)
- Objection.js: 9.93ms (🥉)
- Sequelize: 10.06ms
- TypeORM: 6.58ms (🥇)
- Sequelize: 7.92ms (🥈)
- Prisma: 8.64ms (🥉)
- Objection.js: 8.78ms
- TypeORM: 0.67ms (🥇)
- Prisma: 1.42ms (🥈)
- Objection.js: 2.58ms (🥉)
- Sequelize: 2.67ms
The following histograph represents the time comparison between each ORM for each operation.
-
TypeORM Dominance: TypeORM consistently outperformed all other ORMs across all operations, making it the clear winner for SQLite-based applications.
-
SQLite Limitations: Objection.js suffered significantly in bulk operations due to SQLite's lack of batch insert support.
-
Prisma Efficiency: Prisma showed strong performance in most operations, particularly in complex queries and updates.
-
Sequelize Consistency: Sequelize provided consistent performance across all operations, though not the fastest in any category.
-
Raw SQL Advantage: TypeORM's use of raw SQL queries in this implementation likely contributed to its superior performance.
- For SQLite Projects: TypeORM is the clear choice for best performance
- For Type Safety: Prisma offers excellent type safety with good performance
- For Flexibility: Sequelize provides the most features and flexibility
- For SQL Control: Objection.js offers the most SQL-like query interface
The benchmark tests each ORM with:
- 5 iterations per operation
- Fresh test data for each iteration
- Proper database cleanup between iterations
- High-precision timing measurements
- Error handling and validation
All tests were conducted on the same hardware and software environment to ensure fair comparison.