frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Benchmarks for Golang SQLite Drivers

https://github.com/cvilsmeier/go-sqlite-bench
51•cvilsmeier•3d ago

Comments

_hyn3•3d ago
Excellent evaluation. From reading the code, it appears that the units for the numbers column is usually milliseconds (ms)

It also looks like squinn is the clear leader for most but not all of the benchmarks.

Even though it's "not scientific", is still very useful as a baseline - thanks for taking this effort and publishing your results!

Also taking a look at monibot.io , looks cool

Kimitri•3h ago
This is interesting and very timely for me. Just this week I was building a small Go system that uses SQLite. I needed to cross-compile it for FreeBSD on a Mac and ran into issues with CGO. The easiest fix seemed to be to switch from a CGO based library to a pure Go one.
maxmcd•3h ago
This library is wild https://github.com/cvilsmeier/sqinn

Sqlite over stdin, to a subprocess, and it's fast!

Twirrim•2h ago
It's wild to me that stdin/stdout is apparently significantly faster than using the API in so many cases.

That's the kind of result that makes me wonder if there is something odd with the benchmarking.

karel-3d•1h ago
note that the author of the benchmark is also author of this library.
sureglymop•42m ago
That's an interesting approach but doesn't it mean that if you want multiple connections at the same time, you'd need multiple subprocesses?

Perhaps I misunderstand though.

jitl•1h ago
For a project a while back, I needed to turn many-gigabyte Postgres CSV table dumps into SQLite databases. I turned to Go as its a great language for easy parallelism combined with enough memory layout control to get relatively good performance.

I quickly ruled out using database/sql drivers as the indirection through interface types added a bunch of overhead and stymied my attempts for reasonable memory layout. For my use-case, I found the crawshaw driver performed the best, but I ended up forking it as well as the Golang standard library CSV parser as I found defensive copying & allocation was the largest bottleneck. I ended up cycling several very large arenas among a CSV parser thread that filled the arena with column bytes and several threads writing to different temporary sqlite databases. Then at the end I ATTACHED them together and copied them into one big file (idk exactly why this is faster, but my profiles showed most cpu time spent in sqlite doing query binding things so MOAR CORES).

One notable optimization was exposing a way to bind borrowed bytes to query parameters without inducing a copy in either Golang caller code, or SQLite library code. The crawshaw driver upstream only exposes sqlite_bind_blob with SQLITE_TRANSIENT mode, which tells SQLite to copy the input to a private allocation before returning from the sqlite_bind* call. I added a version that passes SQLITE_STATIC, which means "trust me, I won't touch these bytes until the query is done, and I'll free them afterwards". This is safe in Rust who's "borrow" and "lifetime" concept models this perfectly, but I guess in Golang its dicey enough to not expose in your public package.

Here's the relevant commit in my fork: https://github.com/crawshaw/sqlite/commit/82ad4f03528e8fdc6a...

I'm curious how OP's https://github.com/cvilsmeier/sqinn would fare, I'm somewhat sus about copying 200GB to stdin but the benchmark results are pretty good so ¯\_(ツ)_/¯

jitl•1h ago
There may be an opportunity to switch from TRANSIENT to STATIC in sqinn but I didn't read deeply enough to follow what the current memory approach is. https://github.com/cvilsmeier/sqinn/blob/a88b3df6c89f0531e39...
Mawr•41m ago
Nit: "For benchmarks I used the following libraries: <snip>". This is begging to be a table.

Io_uring, kTLS and Rust for zero syscall HTTPS server

https://blog.habets.se/2025/04/io-uring-ktls-and-rust-for-zero-syscall-https-server.html
50•guntars•2h ago•9 comments

Control shopping cart wheels with your phone (2021)

https://www.begaydocrime.com/
122•mystraline•4h ago•19 comments

DeepSeek-v3.1

https://api-docs.deepseek.com/news/news250821
394•wertyk•10h ago•96 comments

Uv format: Code Formatting Comes to uv (experimentally)

https://pydevtools.com/blog/uv-format-code-formatting-comes-to-uv-experimentally/
204•tanelpoder•9h ago•128 comments

Everything Is Correlated

https://gwern.net/everything
18•gmays•3h ago•1 comments

From GPT-4 to GPT-5: Measuring progress through MedHELM [pdf]

https://www.fertrevino.com/docs/gpt5_medhelm.pdf
84•fertrevino•7h ago•56 comments

Crimes with Python's Pattern Matching (2022)

https://www.hillelwayne.com/post/python-abc/
162•agluszak•10h ago•61 comments

Benchmarks for Golang SQLite Drivers

https://github.com/cvilsmeier/go-sqlite-bench
51•cvilsmeier•3d ago•9 comments

1981 Sony Trinitron KV-3000R: The Most Luxurious Trinitron [video]

https://www.youtube.com/watch?v=jHG_I-9a7FY
41•ksec•18h ago•34 comments

An interactive guide to SVG paths

https://www.joshwcomeau.com/svg/interactive-guide-to-paths/
257•joshwcomeau•3d ago•26 comments

Elegant mathematics bending the future of design

https://actu.epfl.ch/news/elegant-mathematics-bending-the-future-of-design/
83•robinhouston•3d ago•4 comments

How Not to Buy a SSD

https://andrei.xyz/post/how-not-to-buy-a-ssd/
23•speckx•3d ago•8 comments

Weaponizing image scaling against production AI systems

https://blog.trailofbits.com/2025/08/21/weaponizing-image-scaling-against-production-ai-systems/
345•tatersolid•17h ago•93 comments

AI tooling must be disclosed for contributions

https://github.com/ghostty-org/ghostty/pull/8289
582•freetonik•11h ago•329 comments

How does the US use water?

https://www.construction-physics.com/p/how-does-the-us-use-water
136•juliangamble•17h ago•127 comments

Building AI products in the probabilistic era

https://giansegato.com/essays/probabilistic-era
114•sdan•11h ago•61 comments

Beyond sensor data: Foundation models of behavioral data from wearables

https://arxiv.org/abs/2507.00191
206•brandonb•15h ago•43 comments

How well does the money laundering control system work?

https://www.journals.uchicago.edu/doi/10.1086/735665
220•PaulHoule•16h ago•225 comments

AWS CEO says using AI to replace junior staff is 'Dumbest thing I've ever heard'

https://www.theregister.com/2025/08/21/aws_ceo_entry_level_jobs_opinion/
1237•JustExAWS•17h ago•499 comments

Skill issues – Dialectical Behavior Therapy and its discontents (2024)

https://www.thedriftmag.com/skill-issues/
41•zt•2d ago•14 comments

Show HN: Splice – CAD for Cable Harnesses and Electrical Assemblies

https://splice-cad.com
62•djsdjs•8h ago•7 comments

My other email client is a daemon

https://feyor.sh/blog/my-other-email-client-is-a-mail-daemon/
113•aebtebeten•21h ago•17 comments

Miles from the ocean, there's diving beneath the streets of Budapest

https://www.cnn.com/2025/08/18/travel/budapest-diving-molnar-janos-cave
115•thm•3d ago•25 comments

Text.ai (YC X25) Is Hiring Founding Full-Stack Engineer

https://www.ycombinator.com/companies/text-ai/jobs/OJBr0v2-founding-full-stack-engineer
1•RushiSushi•8h ago

Show HN: OS X Mavericks Forever

https://mavericksforever.com/
317•Wowfunhappy•3d ago•135 comments

Using Podman, Compose and BuildKit

https://emersion.fr/blog/2025/using-podman-compose-and-buildkit/
258•LaSombra•19h ago•92 comments

Google scores six-year Meta cloud deal worth over $10B

https://www.cnbc.com/2025/08/21/google-scores-six-year-meta-cloud-deal-worth-over-10-billion.html
77•herpderperator•5h ago•18 comments

Philosophical Thoughts on Kolmogorov-Arnold Networks (2024)

https://kindxiaoming.github.io/blog/2024/kolmogorov-arnold-networks/
35•jxmorris12•3d ago•4 comments

Privately-Owned Rail Cars

https://www.amtrak.com/privately-owned-rail-cars
129•jasoncartwright•17h ago•171 comments

The AI Job Title Decoder Ring

https://www.dbreunig.com/2025/08/21/a-guide-to-ai-titles.html
60•dbreunig•10h ago•55 comments