[HN Gopher] How fast is Go? simulating particles on a smart TV
___________________________________________________________________
How fast is Go? simulating particles on a smart TV
Author : lossolo
Score : 42 points
Date : 2025-09-24 18:48 UTC (4 hours ago)
(HTM) web link (dgerrells.com)
(TXT) w3m dump (dgerrells.com)
| truth_seeker wrote:
| > On the topic of memory, with millions of particles the server
| barely breaks over 100mb
|
| Although experimental as of now, but use of arena package is a
| natual fit here.
| pixelpoet wrote:
| Gaffer (Glenn Fiedler, mentioned in the article) would also say,
| and I quote, "if you use Euler, then you're a bloody idiot" :)
| This simulation is using Euler integration.
| mosura wrote:
| Is this on a smart TV or a server feeding the results to a smart
| TV? Seems like quite an important difference.
| cogman10 wrote:
| My suggestion to the OP talking about compression.
|
| First up, consider just PNG compressing the image for simplicity.
| It's a mostly black image with color dots. That would generally
| compress really well with PNG.
|
| But also, knowing the nature of the image, you could pretty
| easily compress the image by doing offsets to the next pixel. The
| format could look roughly something like this
|
| [offset byte, color byte, offset byte, color byte].
|
| It will fail in cases where each pixel has a color and will excel
| when there is a run of black pixels (which there will be a lot of
| those). It's a dead simple format to implement and read as well.
|
| You can even keep the frame around for writing. You'd just be
| counting black pixels left to right top to bottom, emitting that
| number or 255 then 0 resetting and then counting some more.
| gus_massa wrote:
| It also looks like half of the screen doen't change (the part
| that is far away fro the cursor), so compressing the xor of the
| new and old image would improve compression a lot.
| cogman10 wrote:
| Yeah, that would also help with when the image is static with
| no interactions.
___________________________________________________________________
(page generated 2025-09-24 23:00 UTC)