Back to feed
Dev.to
Dev.to
7/20/2026
My GPU DuckDB extension was 109x slower end-to-end than native — here's the diagnosis and fix

My GPU DuckDB extension was 109x slower end-to-end than native — here's the diagnosis and fix

Original: My GPU database was 110 slower than its own kernel. I published the benchmark anyway.

Short summary

A developer honestly benchmarked their GPU DuckDB extension (gpudb) against native DuckDB and found it 3x–109x slower on whole queries despite fast kernel-level numbers. Publishing the honest results forced a structural diagnosis: double buffering, a global mutex, and Metal's lack of IEEE-754 double support were the culprits. The fix in v0.3.0 removed the GPU from the SQL hot path entirely, using 24-byte streaming accumulators that closed the gap to 0–20% of native performance.

  • GPU DuckDB extension was 3x–109x slower than native on whole queries despite fast kernels
  • Honest benchmarking revealed structural issues: double buffering, global mutex, no GPU double support
  • v0.3.0 fix removed GPU from SQL hot path, using streaming accumulators to close gap to within 0–20%

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more