Better HN
topnewbestaskshowjobs
Log inSign up

plpot

1 karma · joined May 1, 2018 (8y ago) · 3 submissions

I like computers, don't like computer people.
Submissions

comment 8y ago · link · parent

But this will never be true in any low level language. You can spend a lot of time optimizing any single line of code manually, but software will always be faster than you. And will optimize any code you write beyond recognition.

comment 8y ago · link · parent

What you see there is the insane amount of complexity to create a high level feature of C: functions, plus compiler optimizations.

What I don't understand about this argument is that you are calling C a high-level language because of compiler optimizations. I can write code in assembler, or in LLVM SSA, and still use software to optimize it beyond recognition.

comment 8y ago · link · parent

I find this article insightful, but missing the points it tries to deliver.

What the article is very good at delivering is that current CPU's ISAs exports a model that doesn't exist in reality. Yes, we might call it PDP-11, although I miss that architecture dearly.

C was never meant to be a low level language. It was a way to map loosely to assembler and provide some higher level abstraction (functions, structures, unions) to write code that was more readable, and structured, than assembler. And yes, it is far from perfect. And yes, today is called a low level language with good reasons.

But this article is all about exposing the insanity that modern CPU have become, insanity that is the sacrifice to the altar of backward compatibility -- all CPU architecture that tried the path of not being compatible with older CPUs have died.

I am pretty sure that once we'll have an assembler that map closely to the microcode, or to the actual architecture of the internals of a modern, parallel, NUMA architecture, we will still need to have a C-like language that will introduce higher level features to help us ease writing of non-architecture dependent parts. And it will most probably be C.