Top all-time · #2732
Aaron Ballman
Personal blog · blog.aaronballman.comprogramming
Aaron Ballman writes Ruminations, a personal blog at blog.aaronballman.com about programming. Since 2011, 10 different Hacker News readers have linked it 11 times, most often “Don't use the [[likely]] or [[unlikely]] attributes”. The last post was in 2023, but the archive is still widely read.
Most-linked posts?
- Don't use the [[likely]] or [[unlikely]] attributes4 people · 4 mentions · first linked 2021-04-07
- Musings on the C Charter2 people · 2 mentions · first linked 2024-01-01
- What's New in C in 2023?2 people · 2 mentions · first linked 2023-10-02
What Hacker News says?
No, they are intended for helping with performance (letting the compiler know which branch of execution should it make the "default" for the CPU). But see "Don’t use the [[likely]] or [[unlikely]] attributes": https://blog.aaronballman.com/2020/08/dont-use-the-likely-or...
Comment linking /2020/08/dont-use-the-likely-or-unlikely-attributes/
on “All C++20 core language features with examples”Submitted Musings on the C Charter as a story · 56 points
HN discussionTry with http: http://blog.aaronballman.com/2023/12/musings-on-the-c-charte... For me the original https link fails with "SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG" The http link redirected to safebrowse.io/warn.html where there is a "Proceed Anyway" link to get to the content.
Comment linking /2023/12/musings-on-the-c-charter/
on “Musings on the C Charter”Submitted Musings on the C Charter as a story · 55 points
HN discussionWhat everybody should read before using these (Aaron Ballman is a Senior Staff Compiler Engineer for Intel and is the lead maintainer of the Clang open source compiler): https://blog.aaronballman.com/2020/08/dont-use-the-likely-or...
Comment linking /2020/08/dont-use-the-likely-or-unlikely-attributes/
on “C++ Attribute: Likely, Unlikely”Submitted High-level overview of remote thread injection on Windows as a story · 3 points
HN discussionSee also: https://blog.aaronballman.com/2020/08/dont-use-the-likely-or... tl;dr: these attributes are absolutely full of footguns because the standard is not explicit about precedence and nesting, and you should probably avoid them and prefer to spend time investing in PGO. It’s very easy to make sane-looking code containing these attributes which does the exact opposite of what you intended. Note that this issue do…
Comment linking /2020/08/dont-use-the-likely-or-unlikely-attributes/
on “C++ Attribute: Likely, Unlikely”Submitted Don't use the [[likely]] or [[unlikely]] attributes as a story · 2 points
HN discussionSubmitted What's New in C in 2023? as a story · 2 points
HN discussionSubmitted What’s New in C in 2023 as a story · 1 points
HN discussionSubmitted Implementing a four-bit adder with C++ template metaprogramming as a story · 1 points
HN discussion