Quoting Michael Niedermayer (2024-07-18 00:42:05) > all the stuff should be put together close so its efficiently > using CPU caches
Which is why it shares its cacheline with PutBitContext, because the code benefits from having the both in the cache, right? And the 4-byte hole in PutBitContext is there presumably to aerate the cache for smoother data streaming. More seriously, this is not how caches work. Being close together matters mainly so long as your data fits in a cacheline, beyond that physical proximity matters little. On stack, the bitreader is likely to share the cacheline with other data that is currently needed, thus improving cache utilization. Another factor that matters in efficient cache use is e.g. not having multiple copies of the same constant data scattered around, which you're objecting to in my other patches. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".