Skip to content

Conversation

@crishoj
Copy link

@crishoj crishoj commented Nov 20, 2025

Asked @claude to write benchmarks (based on this methodology).

  • LibSQL is Prisma's default @prisma/adapter-libsql
  • Bun SQLite is this package
📊 PERFORMANCE COMPARISON TABLE
================================================================================

Query                               LibSQL          Bun SQLite      Difference
--------------------------------------------------------------------------------
findMany-users-limit                254.79μs        179.25μs        🟢 +29.6%
findMany-posts-published            7.11ms          3.44ms          🟢 +51.6%
findMany-users-with-profile         640.08μs        424.88μs        🟢 +33.6%
findMany-posts-with-relations       836.33μs        622.12μs        🟢 +25.6%
aggregate-users-count               147.42μs        171.54μs        🔴 -16.4%
create-user                         329.83μs        328.21μs        🟢 +0.5%

================================================================================
🟢 = Faster (Bun)   🔴 = Slower (Bun)   ⚪ = Same

crishoj and others added 6 commits November 20, 2025 17:14
- Add benchmark infrastructure comparing Bun SQLite vs LibSQL adapters
- Implement Prisma's official benchmarking methodology (500 iterations, outlier removal)
- Include 27 query patterns: simple selects, joins, filters, aggregations, writes
- Add statistical analysis utilities with median/percentile calculations
- Create visualization tools with comparison tables and bar charts
- Migrate to Prisma 7 with prisma.config.ts configuration
- Add benchmark scripts to package.json (bench, bench:quick, bench:compare)
- Update to ESM format with "type": "module"
- Fix type/value export separation in src/index.ts for ESM compatibility
- Add .gitignore entries for IDE and generated files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant