Recent submissions

Comment · 3 years ago
It's ironic that Musks two big successes were funded by the Obama administration against vehement Republican objections. Shelby repeatedly tried to kill Space-X and without the $400million DOE loan Tesla would never have been able to start production - and without the electric car tax credit - it never would have been able to sell.
Comment · 4 years ago
Comment · 4 years ago
It's interesting how often people repeat this argument as if it were persuasive. The compiler developers and Standards writers made an engineering decision which is hard to justify so most people who support it don't even try.
Comment · 4 years ago
Good explanation of my overly terse note. The current standard interrupt architecture imposes enormous latency and the synchronous timer could be more precise. The simplest implementation would just "fetch" jmp every N instructions (with N programmable) - just like voluntary switching but where the processor would volunteer the program.
Comment · 5 years ago
A) there is no evidence such phenomena - especially in net- are due to unsafe optimizations, b) those companies dont need to shift their costs to other users
Comment · 5 years ago
You still don't have any data.
Comment · 5 years ago
It's because C has pointers and FORTRAN doesn't and pointers are a pain for certain types of optimization.
Comment · 5 years ago
Your argument would be more compelling if programming languages with higher level iteration primitives were significantly more optimizable than C. The underlying processor architectures have loop indexes. Just pretending you can do applicative programming doesn't mean you can. C is very adaptable - even to GPUs. Also, I have yet to see that decent memory model.
Comment · 5 years ago
I doubt that very much, and one of the points of the article is that there is a shortage of data to back up claims like yours.

In any case, for people who want to write OS or cryptography or embedded systems or arithmetic libraries or ... in C, this is not a relevant point.

Comment · 5 years ago
There was no size_t in K&R1. Size_t was introduced in the standards process as was the definition of index variables in the for loop. You may have a complain with the standard there.

As for the optimization, it is based on misunderstanding of C semantics. The only place where the sign extend makes a difference is where pointers are longer than "ints" AND where the the iterator can overflow, and in that case, sign extend only makes a difference if the loop is incorrectly coded so that the end condition is never true. The code should just provoke a warning and then omit the sign extend (and it almost certainly doesn't make much of a difference since sign extend is highly optimized and has zero cost in a pipelined processor).

Comment · 5 years ago
It is because they are "free" and also because they attract massive investment from FAANG and National Labs etc.
Comment · 5 years ago
Nobody claims optimizations are not important.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton