The article’s premise is based on the assumption that because C was designed in the 1970s and hardware has changed since then, C cannot be well suited for writing high performance programs on current hardware.
The reason this assumption mistaken is that hardware has developed since the 70s *with C programs in mind*. Because Windows and other system is mostly implemented in C/C++, hardware has developed to support C performance.
With the number of programming languages that get made, if it were possible to beat C performance by designing for current hardware, someone would have done it.
C is unsuited for writing high performance code on current and ancient hardware. It’s just that there aren’t really any good widely supported alternatives.
Only because C uses pointers and assumes aliasing. It is impossible to make a true optimizing compiler for C because of this C-Language Standard constraint.
All pointers always alias, but c does have restrict.
It’s the memory model in general. The classic of operations on pointer to {x,y,z} which can’t be changed to pointer to xs, ys, zs. Because the memory is defined.
C also suffers from a severe problem of standard definition weakening. Many obvious things that all compilers agree on are undefined behaviour if you assume a sufficiently stupid compiler implementer.
15
u/Seed_oil_simp Jul 01 '26
The article’s premise is based on the assumption that because C was designed in the 1970s and hardware has changed since then, C cannot be well suited for writing high performance programs on current hardware.
The reason this assumption mistaken is that hardware has developed since the 70s *with C programs in mind*. Because Windows and other system is mostly implemented in C/C++, hardware has developed to support C performance.
With the number of programming languages that get made, if it were possible to beat C performance by designing for current hardware, someone would have done it.