HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"

CppCon · Youtube · 3 HN points · 5 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention CppCon's video "CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"".
Youtube Summary
http://CppCon.org

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2016

Standard strings are slowing you down. Strings are everywhere. Changing the performance of std::string has a measurable impact on the speed of real-world C++ programs. But how can you make strings better? In this talk, we'll explore how Facebook optimizes strings, especially with our open-source std::string replacement, fbstring. We'll dive into implementation tradeoffs, especially the storage of data in the struct; examine which standard rules can and cannot be flouted, such as copy-on-write semantics; and share some of the things we've learned along the way, like how hard it is to abolish the null-terminator. War stories will be provided.

Nicholas Ormrod
Software Engineer, Facebook
Nicholas is a developer efficiency engineer at Facebook. If he talks too much, disable him with a well-placed nerd snipe.

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Aug 08, 2020 · 1 points, 0 comments · submitted by jcla1
There's a pretty good CppCon talk about how they made std::string suck less at facebook

https://youtu.be/kPR8h4-qZdk

I think this is the talk you're referring to. If not, it's still definitely worth a watch:

https://www.youtube.com/watch?v=kPR8h4-qZdk

stuffypages
Part of the motivation for writing this blog post was that I enjoyed this talk so much.
I'm not going to take the responsibility whether it's correct or not - here's the talk I learned it from: https://youtu.be/kPR8h4-qZdk?t=22m17s
gmueckl
I haven't watched all of it, but the explanation for the null terminator bug must contain some OS interaction telling the kernel that it is actually safe to discard the page containing the null terminator (e.g. the madvice call mentioned in a sibling post). If you're doing things like that, you're asking for trouble.
Side note: FB also developed a string library to replace std::string (https://github.com/facebook/folly/blob/master/folly/FBString...).

Here's a video from explaining the motivation behind the project (https://www.youtube.com/watch?v=kPR8h4-qZdk).

Oct 12, 2016 · 2 points, 0 comments · submitted by MaxLeiter
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.