Comment by nine_k

3 years ago

I would say that one should be pretty cautious when baking in assumptions snouty such a fleeting thing as hardware into such a lasting thing as a language.

C itself carries a lot of assumptions about computer architecture from the PDP-9 / PDP-11 era, and this does hold current hardware back a bit: see how well the cool nonstandard and fast Cell CPU fared.

A language standard should assume as little about the hardware as possible, while also, ideally, allowing to describe properties of the hardware somehow. C tries hard, but the problem is not easy at all.

Can you explain what aspect of C from PDP-11 was problematic for Cell?

  • All memory is uniform, for instance. There is one scalar data processing unit that finishes a previous operation and then issues the next: no way to naturally describe SIMD, for instance. No way to speak about asynchronous things that happen on a Cell CPU all the time, as much as I can judge. (I never programmed it, but I remember that people who did said they had to use assembly extensively.)

    OTOH you can write stuff like `*src++ = *dst++`, and it would neatly compile into something like `movb (R1)+, (R2)+`, a single opcode on a PDP-11.