NewsGo |
← back to feed

Benchmarking Backend Frameworks & ORMs: Go vs. Express (Raw SQL) vs. NestJS (Prisma)

by @admin 12 Oct 2026 tech / programming ro / en

When designing backend APIs, developers frequently debate the trade-offs between developer experience (DX) and runtime performance. Frameworks with strong abstractions like NestJS paired with ORMs like Prisma promise rapid development and end-to-end type safety, while lightweight runtimes and raw SQL prioritize execution speed and minimal resource overhead.

To evaluate these trade-offs with empirical data, I implemented the exact same production-grade domain logic—a Fact-Checked News Platform & API—across three distinct tech stacks and benchmarked their response latencies under identical infrastructure conditions.

Environment & Infrastructure Specifications

All three applications were deployed in production mode on the same isolated Virtual Private Server (VPS) instance:

> Disclaimer: These results represent baseline response latency benchmarks (Time To First Byte + query execution) measured under standard server conditions using a single-vNode monitor. They are intended as an exploratory comparison of runtime overhead and data abstraction layers rather than a full synthetic load or stress test.

Tech Stacks & Architectural Strategy

  1. Go + PostgreSQL (pgvector)
  1. Node.js + Express (TypeScript) + MySQL (Raw SQL)
  1. Node.js + NestJS (TypeScript) + MySQL (Prisma ORM)

Benchmark Results

Using a custom-built latency monitor (goChecker), I measured real-time server response times across all three endpoints running on the VPS environment:

| Backend Implementation | Stack & Data Layer Strategy | Real-Time Latency

| Performance Ratio | | --- | --- | --- | --- | | stiri.digital | Go + PostgreSQL (pgvector) | 23 ms | Baseline (1.0x) | | news-express | Node.js + Express (TypeScript) + Raw MySQL | 45 ms | ~2.0x slower | | news-nest | Node.js + NestJS (TypeScript) + Prisma ORM | 278 ms | ~12.1x slower |

Architectural Deep Dive: What Explains the Delta?

1. Go + PostgreSQL (23 ms) — Native Concurrency & Low Overhead

2. Express + TypeScript + Raw SQL (45 ms) — Zero Runtime Abstraction Bloat

3. NestJS + TypeScript + Prisma (278 ms) — The Price of High Abstraction

While NestJS and Prisma offer top-tier developer ergonomics and type safety, the ~12x latency delta highlights key architectural trade-offs:

Key Engineering Takeaways

  1. TypeScript is not the bottleneck: Both Express and NestJS were written in TypeScript, yet Express delivered response times close to native Go (~45 ms vs. 23 ms). TypeScript adds zero runtime overhead; performance costs stem from framework reflection and ORM abstractions.

  2. ORMs trade runtime speed for developer productivity: ORMs like Prisma excel at schema management and rapid feature delivery, but raw SQL remains superior for tight response latency SLAs.

  3. Right tool for the right job:

Reference links
← back to feed