Friday, July 10, 2026

Show HN: Real-time n-body tree code in CUDA https://ift.tt/wuI09sD

Show HN: Real-time n-body tree code in CUDA Sharing an old project of mine, on my RTX 500 Ada laptop GPU, it can simulate up to 4 million particles at ~400 ms per step using the Barnes-Hut algorithm, saturating the 4GB of VRAM available. The octree construction is fast, as well as the traversal. The major bottlenecks are the VRAM usage (1 million bodies require ~1GB), which could be probably halved by reusing intermediate buffers, and the particle to leaf evaluation, which would benefit from more fp32 FLOPS. Moreover, I still don't have a good heuristic to predetermine the size of the BFS queue, perhaps some sort of memory paging could solve the issue. https://ift.tt/V5k6CwM July 10, 2026 at 09:17PM

No comments:

Show HN: Pay-per-Crawl – make AI crawlers pay per page in USDC, for 10 stacks https://ift.tt/FCAdPbl

Show HN: Pay-per-Crawl – make AI crawlers pay per page in USDC, for 10 stacks https://ift.tt/QjAFVsd October 17, 2026 at 11:46PM