Is Cinebench a totally useless benchmark?

By: Patrick Chase (patrickjchase.delete@this.gmail.com), January 21, 2014 10:13 am
Room: Moderated Discussions
Maynard Handley (name99.delete@this.name99.org) on January 20, 2014 3:25 am wrote:
> One thing I have not yet had time to look into closely is the state of art in indirect
> jump prediction. I could well believe this is something Apple care about (and have
> invested in) rather more than Intel. Sure, Intel care about C++ and Java, but they also
> care about a lot of other stuff, whereas Apple cares pretty much exclusively about
> Objective C, which means that when you hit message dispatch you want that thing to run
> like a bat out of hell.
> The obvious thing I was thinking of (as I say, I need some time
> to do reading on this) is something somewhat like gshare.
>
> We operate on the assumption that the PC of a particular indirect jump is not, by
> itself, very useful in predicting the target address because pretty much every
> Objective C dispatch goes through the same routine (which does a table lookup based
> on the class+method, and jumps to what's in the table). In this respect, ObjC is
> less helpful than C++, where for many if not most VTable dispatches, the target last
> time at this PC is the same as the target this time. (But ObjC does match how this
> also plays out with most interpreted languages.)

Let me see if I understand your argument correctly: You're arguing that ObjC differs from C++ in that ObjC dispatches always go through objc_msgSend() (i.e. the PC of the branch is always the same) whereas in C++ the Vtable lookup is typically inlined, and the calling PC may therefore tell you something about the target. Is that an accurate summary?

As you acknowledge at the end this isn't really different from how modern SW on any other platform behaves (read: Java, C# and other stuff that runs in MS-CLR, etc). I therefore don't see it as an area where Apple would have a dramatically stronger incentive than Intel. They've both had to beef up that aspect of their designs.

For those who don't follow ObjC esoterica, this article presents a decent overview of OSX message dispatch as of a few revisions back. Maynard's post mostly describes the fast path, i.e. the behavior when the call hits the method cache.

http://www.friday.com/bbum/2009/12/18/objc_msgsend-tour-part-3-the-fast-path/

There was also a 2600 article a few years back that presented an exhaustive tour of ObjC message dispatch, though with a somewhat more colorful and...um... exploitative emphasis.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Some cinebench scores and IPCTimothy McCaffrey2014/01/17 09:27 PM
  Many Thanks :) (NT)Alberto2014/01/18 02:12 AM
  Thanks! :-) (NT)Poindexter2014/01/19 04:46 AM
  Is Cinebench a totally useless benchmark?slacker2014/01/19 11:47 AM
    Is Cinebench a totally useless benchmark?Brett2014/01/19 12:48 PM
      Is Cinebench a totally useless benchmark?Alberto2014/01/19 02:08 PM
        Is Cinebench a totally useless benchmark?Exophase2014/01/19 07:48 PM
          Is Cinebench a totally useless benchmark?Alberto2014/01/20 02:15 AM
            Is Cinebench a totally useless benchmark?Exophase2014/01/20 02:45 AM
              Is Cinebench a totally useless benchmark?Alberto2014/01/21 04:42 AM
                Is Cinebench a totally useless benchmark?Exophase2014/01/21 08:10 AM
                  Monopolies holding back advancementsDoug S2014/01/21 06:04 PM
                    Monopolies holding back advancementsMaxwell2014/01/22 08:00 AM
                      Monopolies holding back advancementsDoug S2014/01/22 11:31 PM
                        Moore's Law provided Planned Obsolescencehobold2014/01/23 01:31 AM
                          Moore's Law provided Planned ObsolescenceDoug S2014/01/23 08:54 PM
                            Moore's Law provided Planned Obsolescencehobold2014/01/24 03:02 AM
                              Moore's Law provided Planned ObsolescenceDoug S2014/01/24 01:18 PM
        Is Cinebench a totally useless benchmark?Maynard Handley2014/01/19 10:26 PM
          Is Cinebench a totally useless benchmark?Exophase2014/01/19 11:01 PM
            Is Cinebench a totally useless benchmark?Maynard Handley2014/01/20 03:25 AM
              Is Cinebench a totally useless benchmark?Patrick Chase2014/01/21 10:13 AM
                Is Cinebench a totally useless benchmark?Patrick Chase2014/01/21 12:31 PM
          Is Cinebench a totally useless benchmark?Patrick Chase2014/01/21 09:19 AM
            Intel and branch predictionDavid Kanter2014/01/21 10:26 AM
              Intel and branch predictionMaynard Handley2014/01/21 08:52 PM
                Intel and branch predictionMaynard Handley2014/01/21 09:14 PM
                No dynamic predication yet, I suspectPaul A. Clayton2014/01/21 10:04 PM
                  No dynamic predication yet, I suspectExophase2014/01/22 12:29 AM
                    No dynamic predication yet, I suspectdmcq2014/01/22 05:24 AM
                    No dynamic predication yet, I suspectPatrick Chase2014/01/22 11:36 PM
                      No dynamic predication yet, I suspectMaynard Handley2014/01/23 08:51 AM
                        No dynamic predication yet, I suspectPatrick Chase2014/01/23 11:59 AM
                          No dynamic predication yet, I suspectPatrick Chase2014/01/23 12:01 PM
                          16 misses per core on Haswell?David Kanter2014/01/23 06:10 PM
                            16 misses per core on Haswell?Patrick Chase2014/01/23 08:12 PM
                          No dynamic predication yet, I suspectPatrick Chase2014/01/27 06:34 PM
                            Fixed link to paperPaul A. Clayton2014/01/28 08:51 AM
                        No dynamic predication yet, I suspectPatrick Chase2014/01/23 12:29 PM
                      SMT influence on ROB size?Paul A. Clayton2014/01/23 11:26 AM
                        SMT influence on ROB size?Patrick Chase2014/01/23 08:40 PM
    Is Cinebench a totally useless benchmark?Exophase2014/01/19 07:44 PM
    Is Cinebench a totally useless benchmark?anon2014/01/19 08:43 PM
      Is Cinebench a totally useless benchmark?Timothy McCaffrey2014/01/20 04:24 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell purple?