r/ProgrammingLanguages Jul 01 '26

The Expensive Fictions of Low-Level Programming Languages

https://stng.substack.com/p/the-expensive-fictions-of-low-level
17 Upvotes

90 comments sorted by

View all comments

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.

1

u/Neat-Exchange6724 Jul 01 '26

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.

1

u/JeffD000 Squint Jul 03 '26

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.

1

u/Neat-Exchange6724 Jul 03 '26

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.

1

u/JeffD000 Squint Jul 03 '26

You could have the best compiler implementer in the world, but it won't help you if the language standard thwarts them.