logoalt Hacker News

chiiyesterday at 6:21 AM1 replyview on HN

> the other half were definitely "wow" moments.

do you have some samples? It would be interesting to learn what it might be.


Replies

stickfigureyesterday at 2:43 PM

Here are two:

* Using spherical points instead of trig to calculate distance between two geo locations.

* Packing data to minimize memory bandwidth consumption. Converting arrays of objects to multiple arrays of their component parts I sort of expected; bitshifting to pack and unpack multiple values into a `long` I did not.

Maybe other people would find these obvious, but I don't usually have to optimize at this level. My mental model of the relative speed of some CPU operations was a little out of date.