Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023
CppNow1 HN recommenders · 2023–2025
71K views · talk · evergreen · Uploaded 2023-08-17
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.
Recommended as a recent take on rethinking compiler architecture, and cited in discussions of flattened ASTs and fast lexers.
49:55How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
36:45Rich Harris - Rethinking reactivity
You Gotta Love Frontend
1:12:27CppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
51:18Lexical Scanning in Go - Rob Pike
GoogleFOSSSydney
1:31:06William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
1:02:42Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)
DevGAMM
42:15"Performance Matters" by Emery Berger
Strange Loop Conference
1:48:55The Thirty Million Line Problem
Molly Rocket
4 comments from 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]
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
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.
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 performance: [VIDEO]