Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

possible to use gpu to parse json or http header?


HTTP header: These are small and so it's unlikely you'd overcome the overhead of sending it to the gpu. I could be wrong in some cases though, like servers which have to parse hundreds of HTTP headers at once (I imagine this kind of thing must happen somewhere...)

JSON: Seems unlikely. Nested structure like that often has bad perf on the GPU. You might be able to organize it to parse a lot of the same kinds of JSON files though.

A decent way to think about the GPU is that it's a couple thousand (for good GPUs) processors of power equivalent to a 1st gen pentium (there are many quirks, like they hate branching, but this is an ok way of thinking about the compute power).

Unless you can actually leverage that parallelism -- and there's a lot there -- it's not going to be a net win. It's also fairly expensive to send data to the GPU, nothing that bad, but enough that for anything fairly small you're way better of staying on the CPU




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: