TFW 8-bit integers are too small, but 16-bit integers are too big, so you go with 12-bit integers… and it actually results in a nice perf win
-
Show this thread
-
I’d like to heartily recommend 12-bit integers for all your computing needs
3 replies 2 retweets 34 likesShow this thread -
-
Replying to @SimonSapin
It’s to squeeze all the data for a vertex instance into 64 bits so an entire instance can fit in a CPU register.
1 reply 1 retweet 1 like
Replying to @pcwalton @SimonSapin
(Specifically, it’s the data for a line segment: two pairs of (x, y) coordinates, 12-bit 4.8 fixed point for each coordinate — the tiles are 16x16 so this is OK — plus a 16-bit tile index, makes 64-bit instance data. Rustc then goes to town optimizing it) :)
0 replies
1 retweet
3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.