• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: __builtin_expect in clang?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __builtin_expect in clang?


  • Subject: Re: __builtin_expect in clang?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 11 Nov 2011 13:24:58 -0800


On Nov 10, 2011, at 5:51 AM, Andreas Grosam wrote:

I can't see any performance differences in a very hot code spot, when using it in branches, or omitting it, or even when giving the compiler *false* hints.
So, I'm wondering whether  __builtin_expect is implemented in clang?

Disassemble the resulting code to see whether it makes a difference. It should affect the ordering of instructions and the sense of the conditional branches (usually the straight-line path is faster than the one that has to branch.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: __builtin_expect in clang?
      • From: Don Quixote de la Mancha <email@hidden>
References: 
 >__builtin_expect in clang? (From: Andreas Grosam <email@hidden>)

  • Prev by Date: How to pause Instruments?
  • Next by Date: Re: __builtin_expect in clang?
  • Previous by thread: __builtin_expect in clang?
  • Next by thread: Re: __builtin_expect in clang?
  • Index(es):
    • Date
    • Thread