Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023
Channel:CppNow · Length:1:35:12 · Published:2023-08-17 · Views:70900
Summary
Chandler Carruth's CppNow 2023 talk on modernizing compiler design for the Carbon toolchain, using data-oriented design and modern hardware assumptions. It covers lexing, parsing and compact data structures aimed at compiler performance.
Why HN recommends it
Recommended as a recent take on rethinking compiler architecture, and cited in discussions of flattened ASTs and fast lexers.
I recommend a watch of this for a recent take on trying to change how we think of these. — HN, 2023
C, C++, Rust, Go & systems languages · Software performance & optimization · Compilers, interpreters & program analysis
Subtitles (excerpt)
My name is Chandler Kuth. I'm here to talk about some fun things that we're trying to do with compiler designs. Um, I know there's been a whole bunch of discussion of like carbon and successor languages. Um, you may be kind of fed up with that. You may want a little bit more C++. I promise I'm actually going to try and keep the carbon parts of this to an absolute minimum. This is mostly talking about here. Let me do this while I'm talking. This is mostly going to be about uh how to build a compiler and some interesting things we think we can do building a compiler and that we're kind of experimenting with on carbon. I am going to mention that and there's some interesting interactions but there's also going to be a lot of C++ code. This is stuff that hopefully works with any kind of uh uh compiler design that you might want to have. Um also just so you know there is uh a link here to the slides. I hope the slides are live. Uh if they aren't don't tell me now, tell me later. uh we'll fix it. Uh we also are going to have some live demo. Uh there's a lot of flexibility. Um it's going to it's going to be a really informal kind of talk. So I'd love to have questions, love to have discussion anytime.
On Hacker News
No but it is endemic to how we think about compilers up to now, and especially when the rust compiler arch was massively developed, more than 10 years ago. I recommend a watch of this for a recent take on trying to change how we think of these. It is an open research field [VIDEO] — di4na, 2023-08
Is lexing ever a bottleneck though? Even if you push for lexing and parsing 10M lines/second [1], I'd argue that semantic analysis and codegen (for AOT-compiled languages) will dominate the timings. That said, there's no reason not to squeeze every bit of performance out of it! [1]: In this talk about the Carbon language, Chandler Carruth shows and explains some goals/challenges regarding perform… — norskeld, 2025-07
Chandler discusses it in this video though! [VIDEO] You get some traversals for free with this layout (preorder, reverse post order). Can search for subtrees with string searching algorithms or more complex things with regex. — wrsh07, 2025-01
Cache the position of quotes/apostrophes, etc. Optimizing for your edge case would require everyone writing and reading code to conform to this extra thing, which seems completely unnecessary. Machines are pretty fast. [VIDEO] Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023 — pas, 2024-08
Related videos
- Velocity NY 2013: Richard Cook, "Resilience In Complex Adaptive Systems" · O'Reilly · 19:09
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- CppCon 2015: Andrei Alexandrescu “std::allocator...” · CppCon · 1:12:27
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc) · DevGAMM · 1:02:41
- "Performance Matters" by Emery Berger · Strange Loop Conference · 42:15
- The Thirty Million Line Problem · Molly Rocket · 1:48:55
- CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step” · CppCon · 59:33
- RustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West · Rust Programming Language · 42:29
- Erlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp · Erlang Solutions · 49:15
- How Crash Bandicoot Hacked The Original Playstation | War Stories | Ars Technica · Ars Technica · 31:37
- "How NOT to Measure Latency" by Gil Tene · Strange Loop Conference · 42:59
- CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17” · CppCon · 1:19:52
- Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming · Google TechTalks · 57:37