All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

LLM-Generated Code Appears Functional But Performs 20,000x Slower Than SQLite

By

dnw

2mo ago· 21 min readenInsight

Summary

The article critiques LLM-generated code by comparing a simple database operation between SQLite and an LLM-generated Rust rewrite. While the LLM code compiles, passes tests, and appears functional on the surface, it performs 20,171 times slower on basic operations like primary key lookups. The author argues that LLMs produce 'plausible' code that looks correct but is fundamentally inefficient and impractical for real-world use, highlighting the gap between syntactically correct code and performant, production-ready software.

Key quotes

· 5 pulled
SQLite takes 0.09 ms. An LLM-generated Rust rewrite takes 1,815.43 ms.
The rewrite is 20,171 times slower on one of the most basic database operations.
The code compiles. It passes all its tests. It reads and writes the correct SQLite file format.
At first glance it reads like a working database engine. But it is not!
Your LLM Doesn't Write Correct Code. It Writes Plausible Code.
Snippet from the RSS feed
One of the simplest tests you can run on a database:

You might also wanna read