[FFmpeg-devel] [PATCH] Add "cold" attribute to init/uninit functions in libavcodec

Michael Niedermayer michaelni
Wed Mar 19 15:34:53 CET 2008

On Wed, Mar 19, 2008 at 11:12:44AM -0300, Ramiro Polla wrote:
> While you're at it, why don't you take a look at the (un)likely macros 
> the linux kernel uses?
> It's stuff like:
> (under gcc)
> #define likely(x)       __builtin_expect(!!(x), 1)
> #define unlikely(x)     __builtin_expect(!!(x), 0)
> that could be used in some speed critical places where we know more than 
> gcc about the probability of a condition.
> Is this welcome in FFmpeg?

if and only if it does provide some speed gain (needs benchmarks)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080319/a91ce974/attachment.pgp>

More information about the ffmpeg-devel mailing list