On Tue, 24 Mar 2015, Derek Buitenhuis wrote:

On 3/24/2015 6:53 PM, Luca Barbato wrote:
No, it is exactly to keep the structure packed a little as I explained
to Vittorio privately.

So, micro-optimizations / ricing?

For some cases, it does matter. I don't agree it matters in any significant way for a context, but I did such a change for the mp4 muxer a few years back. Since the mp4 muxer keeps track of all written samples (in order to write info about them in the moov at the end), its memory usage rises linearly with the length of the muxed file, and I have at a few occasions run out of memory (in 32 bit processes) when muxing insanely long files. By reordering one of those structs, I can manage muxing ~20% longer files before running out of memory (see 5d95112d926).

But that only matters significantly if there are a huge number of those structs, of course.

// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to