Muhammad Faiz (2018-02-08):
> I actually prefer _next() without introducing new API. Yeah, it is
> slower because it must initialize next pointer

I am not sure what you mean here. The problem with initing the next
pointer was never speed.

The problem with the next pointer is that it requires a run-time write
in the codec structure, that requires it to be in the data section
instead of the rodata section.

The static init of this pointer, as you proposed, fixes that specific

But that is still a linked list. Linked lists are very good when you
need to insert and remove in the list frequently, but for something that
is built once and then static, it has very limited usefulness.

If the drawback of memory management for solution C (returning the whole
list at once) is considered too bad, then I think solution B is
preferable: more versatile, easier to understand.

And by the way, until we decide between solutions A, B, C or anything
else proposed, starting coding would be useless. Just as starting to
pack your bags before deciding whether you go to the sea or mountain.


  Nicolas George

Attachment: signature.asc
Description: Digital signature

ffmpeg-devel mailing list

Reply via email to