learning sample of likely() and unlikely() compiler hints

Posted by osgx on Stack Overflow See other posts from Stack Overflow or by osgx
Published on 2010-04-29T16:03:16Z Indexed on 2010/04/29 16:07 UTC
Read the original article Hit count: 150

Filed under:
|
|

Hello

How can I demonstrate for students the usability of likely and unlikely compiler hints (__builtin_expect)?

Can you write an sample code, which will be several times faster with these hints comparing the code without hints.

© Stack Overflow or respective owner

Related posts about compiler

Related posts about c