Post #4433171
2026-08-07 12:05 UTC
@azonenberg@ioc.exchange You should write a book, "Using GPUs to massively speed up your C/C++ code" - targeted for C/C++ programmers.
I'd pre-order it for sure.
Chapter 1 - GPUs for idiots and/or programmers too busy and/or lazy - minimal code to speed up your hello world app by calculating PI to 100 digits. Before/after comparison.
I wonder if you could use a GPU to speed up a database, like for searching or joining tables, creating/comparing search hashes and the like...
Replies (1)
-
@azonenberg@ioc.exchange 2026-08-07 12:11
@0h00000000@ioc.exchange Not familiar with the internals of database engines to the point I could comment. They work best on massively data-parallel problems with predictable, linear memory address ordering. In general the best case scenario is every thread making 32-bit reads and writes to consecutive word addresses, then doing a ton of flops before the next memory access. The further you diverge from this, the further from theoretical peak performance you get.