Live data from Hacker News

Viewing profile — terrymah

terrymah

HN member
Joined
Sun, Jan 29, 2012, 9:08 PM UTC
HN karma
161
Public activity
31 items

About terrymah

No profile information was provided.

Recent public activity

  1. story
  2. comment
    Comment #41185952

    Until yesterday I thought I was the only person in the world who thought the designed behavior was undesirable, though

  3. comment
    Comment #41175585

    Things are much better in 2024 in MSVC than they were in 2014. The overhead today is mostly the additional metadata associated with tracking the state, and most of the inline compa…

  4. comment
    Comment #41175564

    We had a UB version of noexcept for a very, very long time. __declspec(nothrow), the throw() function specifier, etc.

  5. comment
    Comment #41169864

    No, calling throw in a noexcept function is a defined behavior (call std::terminate), and that behavior is not a diagnostic I think maybe WG21 was concerned a compiler engineer wou…

  6. comment
    Comment #41169812

    Determining if a function throws is a pretty basic bit of information collected in bottom up codegen (or during pre pass of a whole program optimization) and in no sense NP hard. C…

  7. comment
    Comment #41169764

    I think WG21 has been violently against adding additional UB to the language, because of some hacker news articles a decade ago about people being alarmed at null pointer checks be…

  8. comment
    Comment #41169726

    Everyone keeps scanning over the inlining issues, which I think are much larger “Zero overhead” refers to the actual functions code gen; there are still tables and stuff that have …

  9. comment
    Comment #41167446

    Well, yeah, things can be related to many things, but throwing extern "C"s was one of the motivations as I recall for 'r'. r is about a compiler optimization where we elide the run…

  10. comment
    Comment #41167342

    Nah that was mostly about extern "C" functions which technically can't throw (so the noexcept runtime stuff would be optimized out) but in practice there is a ton of code marked ex…

  11. comment
    Comment #41167315

    Dude I am going to blow your mind

  12. comment
    Comment #41167139

    Oh, cool! I googled myself and someone actually archived the slides from the talk I gave. I think it holds up pretty well today https://github.com/TriangleCppDevelopersGroup/TerryM…

  13. comment
    Comment #41167122

    No, we compile in bottom up order, starting with leaf functions, and collecting information about functions as we go. So "not throwing" sort of trickles up when possible to a certa…

  14. comment
    Comment #41167111

    It absolutely does, and even better, the compiler deduced "this function doesn't throw" doesn't come with the overhead of implementing noexcept proper

  15. comment
    Comment #41167106

    You can't just look at the codegen of the function itself, you also have to consider the metadata, and the overhead of processing any metadata Specifically here (as I said in other…

  16. comment
    Comment #41167093

    In MSVC we've also pretty heavily optimized the whole function case such that we no longer have a literal try/catch block around it (I think there is a single bit in our per functi…

  17. comment
    Comment #41167036

    Oh man, don't get me started. This was a point in a talk I gave years ago called "Please Please Help the Compiler" (what I thought was a clever cut at the conventional wisdom at th…

  18. comment
    Comment #24049824

    I, too, came for the procedurally generated Doom levels and left disappointed

  19. comment
    Comment #22586969

    From direct effects, maybe. But no one is immune from the second order effects. Once our customers start going out of business because they are directly exposed, they can't buy our…

  20. comment
    Comment #12660790

    It was a joint project, with ms eventually pulling out to work on NT

  21. comment
    Comment #12441019

    You sort of have to, since everyone else is doing it.

  22. comment
    Comment #11639567

    This is both C and C++ - they share a common backend (c2.dll) where this work was done. They have different front ends (c1.dll / c1xx.dll).

  23. comment
    Comment #6534842

    Hmph. You forgot the part where Bubba's friends are watching him drink beer and eat Hungry-Mans, and if they want some, they can force Bubba to throw out all his food and pour all …

  24. comment
    Comment #6534784

    I've heard that modern Intel processors have 100 < x < 200 physical registers. I'm not sure they actually document the exact number.

  25. comment
    Comment #6534772

    It's complicated, but modern processors actually do have many more registers than you can name in the instructions. They use things like "register renaming" to avoid false conflict…