Zig's Andrew Kelley: "The compiler is too dam slow, that's why we have bugs..."

max haughton maxhaton at gmail.com
Mon Jan 29 21:55:25 UTC 2024


On Monday, 29 January 2024 at 20:51:19 UTC, Don Allen wrote:
> On Monday, 29 January 2024 at 08:04:57 UTC, Per Nordlöw wrote:
>> I'm glad Andrew too has realized in what order to fix things - 
>> we all should consider performance-problems bugs.
>>
>> See:
>>
>> https://youtu.be/5eL_LcxwwHg?t=565
>
> He thinks they have bugs because the compiler is too slow? That 
> is truly remarkable.

In a causal sense they're unrelated, but if a program takes far 
longer than it "should"
for the amount of work it's doing, then I would expect bugs.

Speed comes from creative people understanding a domain really 
well. Slowness usually comes from code that solves a problem in a 
weird/roundabout way (usually because its the first attempt).

In compilers in particular after a certain amount of time working 
on a codebase it's somewhat easy to see a bunch of places where 
you could make things faster/correct-er and so on, but these are 
often serious engineering projects to even try unless the 
compiler is particularly well put together i.e. other than the 
speedups that come from chesterton's fences (i.e. "the C standard 
says...").

It doesn't seem alien to me that codebases that can be made fast 
(which these days basically means getting to the heart of a 
problem in a self-contained atom of work that you can cache 
properly) are less buggy in some limit.


More information about the Digitalmars-d mailing list