Post #469217
2026-02-19 22:08 UTC
Once again reminding you of The Trick to reduce the critical decoding path of any off-the-shelf variable-length data format. Split each variable-length item into a small fixed-length part that uniquely determines the length of the remaining variable-length part. Then split the fixed-length and variable-length parts into two streams and use prefix sums: https://gist.github.com/pervognsen/547113f6b368317d86110a6bb01ce314
Replies (2)
-
@zeux@mastodon.gamedev.place 2026-02-19 22:12
@pervognsen Also works within one stream if you interleave groups of K values.
-
@shachaf@gts.y.la 2026-02-26 18:35
@pervognsen I wonder whether it would make sense to define a variable-length instruction encoding this way.