u/Saefrochin r/rust • Recommends
On “Is the statement "Rust is largly unoptimized for speed and has untapped speed potential" true and where is the source?”
#undefinedbehavior#compileroptimizations#llvm
39K subscribers • 49 videos on Hallway • Conference channel
Advanced. Deep dive for people who know the field.
10K views8 years ago2 recommendations
Systems programmingProgramming languagesCompilers and interpretersPerformance and optimizationC++
John Regehr explains how compilers exploit undefined behavior in intermediate representations to perform optimizations and discusses sequential memory models.
cppnow.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: cppnow.org/history/2018/talks/ — This talk is about the inner lives of compiler optimizations. First, I'll explain how undefined behavior (UB) is alive and well in compiler intermediate representations, where it can be exploited to give the optimizer the freedom to perform desirable transformations. Perhaps surprisingly, UB at this level doesn't have that much to do with UB in the original source code. Second -- and closely related -- I'll talk about sequential memory models. C++ occupies a tricky design point: on one hand, it wants to be able to assume that a pointer originating in one block of memory cannot be used to refer to another block, but on the other hand any pointer can be turned into an integer, manipulated arbitrarily, and then turned back into a pointer. These conflicting demands have interesting implications for a compiler's optimization rules and some of the implications are still being figured out. Finally, I'll speculate about the future of compiler optimizations: many optimizations will be formally verified and some will also be generated automatically. The result will be compilers that are less buggy and more effective at optimizing. — John Regehr is a professor of computer science at the University of Utah, USA. His research group creates tools for making software more efficient and correct. For example, one of his projects, Csmith, generates random C programs that have been used to find more than 500 previously unknown bugs in production-quality C compilers. Outside of work John likes to explore the mountains and deserts of Utah with his family. — Videos Filmed & Edited by Bash Films: BashFilms.com --- *--* ---What people say. Recommended as an excellent explanation of how compilers exploit undefined behavior at the intermediate representation level.
u/Saefrochin r/rust • Recommends
On “Is the statement "Rust is largly unoptimized for speed and has untapped speed potential" true and where is the source?”
u/tasminimain r/C_Programming • Recommends
On “Three modest proposals for the C standard WG14”