[FFmpeg-devel] [PATCH] avcodec/bsf: Avoid allocation for AVBSFInternal

Nicolas George george at nsup.org
Tue Aug 11 01:11:24 EEST 2020


James Almer (12020-08-10):
> Personally, i don't like it. It's extra complexity to save a single 8 or
> 12 byte allocation that happens once during bsf alloc. It's kind of a
> pointless micro-optimization.

I do not agree at all.

First, it is not extra complexity, it actually makes the code simpler:
less mutually dependant allocations that can lead to leaks if they are
not handled properly, better guarantees, for no more code.

Second, this is precisely the kind of "micro" optimization we should be
doing everywhere, because "micro" times "a lot" starts to be
significant, and FFmpeg has not reached its status by wasting "micro"
optimizations.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200811/6efe74f8/attachment.sig>


More information about the ffmpeg-devel mailing list