Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Native Code Performance and Memory: The Elephant in the CPU

Download

Right click “Save as…”

Slides (view online)
+ My Schedule- My Schedule

C and C++ developers know that memory caching is critical to the performance of native code. But there is much more to the story when it comes to performance on modern CPUs. This talk will examine the pitfalls of poor memory usage in C and C++, and will offer practical guidance for taking advantage of all the memory a CPU has to offer. Memory is the elephant in the CPU. Come learn why.

Follow the Discussion

  • Good talk, Eric. I'm surprised no one has commented on this and I'd hate for folks at MS to think this sort of thing is unappreciated. As a console & PC game dev this subject is near and dear to my heart. And all native code folks should be interested in hearing from the compiler team.

    In fact, as an extension to the VC blog, I would love to see a regular series of short, pointed videos by the compiler team addressing whatever topics they're hot to talk about, and perhaps even answering questions from the "wild" in that format. And yes, I understand perfectly if said team is now cursing my name and lineage after reading that suggestion.

     

     

  • @ScottBruno:+1

  • really cool talk

  • @ScottBruno: "I would love to see a regular series of short, pointed videos by the compiler team addressing whatever topics they're hot to talk about, and perhaps even answering questions from the "wild" in that format."

    Can I give this +infinity? Well, I can settle for +DBL_MAXBig Smile

    Very informative (& useful in practice!) session, thanks!

  • Great talk, i like the style of eric. He totally qualified for a going native talk in september, i hope to hear more from you! Details matter, not expected stuff is even cooler Wink.

    If could highlight also some reading sources (useful books, specific blog posts,...) would be great++.

    I hope Charles is reading this, and he can get you on the speaker list for going native. Haven't seen a page to recommend ppl:-).

    *dreaming* Even cooler would be a Talk voting page  */dreaming*.

     

  • maxime caronmaxime caron

    +1

  • It was too cool.

  • CharlesCharles Welcome Change

    , Eul3r wrote

    Great talk, i like the style of eric. He totally qualified for a going native talk in september, i hope to hear more from you! Details matter, not expected stuff is even cooler Wink.

    If could highlight also some reading sources (useful books, specific blog posts,...) would be great++.

    I hope Charles is reading this, and he can get you on the speaker list for going native. Haven't seen a page to recommend ppl:-).

    *dreaming* Even cooler would be a Talk voting page  */dreaming*.

     

    Indeed, there will be compiler sessions at GoingNative 2013 and my hope is that Eric will be presenting one of them Smiley

    C

  • Bruce DawsonBruce Dawson

    In your backup slides you recommend using /Oy. I think that is really dangerous advice. /Oy typically gives miniscule performance improvements, if any, and it means that most profilers (xperf at least) can no longer get call stacks. Valve (and Microsoft!) routinely do profiling of full retail code, including profiling code running on customer machines. This lets us diagnose huge performance problems. Shutting down that possibility for a possible 1-2% gain is a terrible tradeoff.

    /Oy doesn't harm debugging, but it does harm profiling. Just say no. The VC++ default changed from /Oy to /Oy- for a reason.

  • A brilliant session by a brilliant presenter Smiley
    Maybe only the name of the session can overshadow the session itself Smiley


    Go Leafs Go! Smiley

    Alex

    p.s. I do look at the assembly code - though not as often as I did 20 years ago Smiley

  • AshishAshish

    Nice talk. I would love to get to know more about this. Probably a short series.

  • @Charles: Fantastic!!! Very Exciting!! It's like Christmas! Thanks man!

    Wishlist:1. a talk on multicore, with a deep dive.
    2. more information on the Network Lib and Filesystem Lib.

  • Robert Fidlerfidlerro get your geek on!

    Eric, your session was outstanding!  I am a C# developer and thinking of things from a native code's perspective was eye opening.  Can a C# developer take advantage of the performance tips you'd outlined: keeping data close in memory and memory alignment.  I am not sure if the CLR is optimized to handle these memory optimizations or if the C# compiler does this when the optimization flag is set.  Any information, resources, and/or links where I can learn more on the topic as it pertains to a C# developer would be much appreciated.

  • @fidlerro: Sasha Goldshtein has some writings on these topics: http://blogs.microsoft.co.il/blogs/sasha/

    In particular, see:

    There's (a lot) more under the "Performance" and "Performance Book" tags:

    That being said, it's my impression (possibly biased, I'm mostly a C++ programmer as far as hi-perf. applications are concerned) that, in addition to being able to exercise more control yourself when you're writing from the scratch (where you can get some part of the way in C# with unsafe and value semantics), perhaps more importantly the existing (and reusable) C++ ecosystem built around optimization (like memory alignment, etc.) is much richer (including, for instance, libraries like Intel's TBB which offer allocators with alignment support -- that you can relatively seamlessly integrate with your existing C++ codebase).

  • Great talk!!

    Subject super interesting and good presentation skills!

  • Very interesting talk! Would definitely like to see & hear more about this Smiley!

  • bumpebumpe

    What?!
    A C++ talk with only C++ code in it!
    No crappy locked in C++/cx or C#.

    I'd love to see more of this. In more depth.

  • Great Talk Eric, it was really insightful to understand the way memory is used under the hoods.

  • dragonlipzdragonlipz

    Eric had one of the best talks at Build as far as truly knowing his topic and being able to express is intelligently. Also he's a very energetic speaker. I'd recommend catching his sessions whenever possible.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.