• 0 Posts
  • 12 Comments
Joined 11 months ago
cake
Cake day: February 1st, 2024

help-circle
  • Now, because this article got a little long, as per a friend’s suggestion, here’s a table of contents:

    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









  • I totally agree with you. I’m not a fanboy of any single language (because I’m not a good enough programmer!), but I have a visceral disgust for Java. And the first reply is right: it’s all from the 2000s, but that was when I was forced to interface with it most, and it was simply gross. I’m certain things are better now, 20 years on, but Oracle buying Sun was just the last awful step for me.


  • As hard as it is to say this, unfortunate code breaking changese are going to be made. But only if they help achieve the goals listed above.

    If this is the case then I think it is an incredibly bad choice to name it D or openD or anything similar

    Names are really hard, but non compatible things should not share a name.

    One of the coolest things the perl community ever did was changing the name of perl at the major version when perl 5 came out. That is so smart!, and should be the way all software projects function.