CppCon Day 2

Here’s my notes for day 2!

Will Your Code Survive the Attack of the Zombie Pointers?

Zombie pointers are ABA problem pointers.

Hazard pointers don’t solve the problem.

Paper - http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2369.pdf

“Allegro” Means Fast and Happy. Coincidence?

  • Binary search is bad for branch prediction
  • Floyd’s algorithm
  • Replace conditional jumps with conditional arithmetic
  • \((C(n) + M(n) + kD(n))/n\) where \(C(n)\) is comparisons, \(M(n)\) is moves, and \(D(n)\) is distance between subsequent array accesses. \(k\) is some unknown constant.
  • Performance improves with specializing to invariants. Should adjust hyper-parameters depending on things like type size, type move cost, type comparison cost, etc.

SG20 Panel on Education

I asked a question! It was “what are some things the standards commmittee can do to help with poor error messages?” I don’t think the committee liked that question. Some people laughed at me after hearing it. The first answer I got was along the lines of “complain to your vendor.” But after I pressed it, they talked a bit about what you can do to teach students about error messages. Things like “show them the error messages in a controlled environment” and “translate the error messages for them the first time.”

Met up with Stefan

Behind Enemy Lines: Reverse Engineering C++ in Modern Ages

  • MSVC uses registers to pass parameters when possible


I told my friend Anushree that I hadn’t done any internships yet, and I think she felt bad for me, because we spent the next hour talking to recruiters who’d set up shop at the conference.

C++ Smells

Constructions separated from assignment, output parameters, and other bad practices in C++. Solution is to put const everywhere.

Lightning Talks

These were kinda disappointing. I was hoping to see something more like Chandler Carruth’s lightning talk from 2017, so I guess I was bound to be disappointed, but in general the lightning talk format felt pretty constraining for the presenters, and the content felt a lot less cool than the regular talks. I kinda wish I’d just gone to bed.