Discussion of #Baziotis article on misconceptions about #compilers.
on 02024-12-12#Baziotis bachelor’s #dissertation #paper on #compilers: “Designing Decoupled Compiler Transformation APIs/Σχεδιάζοντας Αποσυνδεδεμένες Διεπαφές για Μετασχηματισμούς Μεταγλωττιστών”
on 02024-12-12#Baziotis on intermediate representations in #compilers and how really target-independent they are. #toread
on 02024-12-12#compilers for #Pandas to get 1000× better #performance on #exploratory-data-analysis: "Dias" by #Baziotis
on 02024-12-12Should #compilers define all #undefined-behavior? #toread #Baziotis
on 02024-12-12#compilers sometimes can’t apply certain optimizations because they would invoke #undefined-behavior, for example hoisting a constant expression out of a loop that might execute zero times. #toread #Baziotis
on 02024-12-12“Dominance is one of the most ubiquitous concepts in #compilers. By far the most popular algorithm for discovering dominance relationships is the Lengauer-Tarjan algorithm - a fascinating but scary piece of genius. In this article, we will deconstruct its most important part, the computation of semidominators. To tackle it, I’ll use a lot of intuition, crappy drawings and some imagination.” #toread #algorithms #Baziotis
on 02024-12-12common misconceptions about #compilers: “Optimization gives us optimal programs”, “Branch weights and the CPU’s branch predictor”, “-O3 produces much faster code than -O2”, “Javascript interpreters JIT at runtime because they don’t know which paths are hot ahead of time”, “If you have a compiler, you don’t need an interpreter”, “The middle-end is target/platform-independent”, “The compiler optimizes for data locality”, “-O0 gives you fast compilation”, “Templates are slow to compile”, “Separate compilation is always worth it”, “Why does link-time optimization (LTO) happen at link-time?”, “Inlining is useful primarily because it eliminates a call instruction”, “The role of the inline keyword”, “The best production compiler to study is LLVM”, “Undefined behavior only enables optimizations”, “The compiler can “simply” define undefined behavior”, “99% correctness rate is ok”. All of these are false except for the ones that aren’t falsifiable. #Baziotis recommends studying the Golang compiler, LDC, and Digital Mars #D.
on 02024-12-12