Live data from Hacker News

The RISC Deprogrammer

blog.erratasec.com

51–60 of 110 posts

Re: The RISC Deprogrammer

#51

Strongly opinionated with a real message, I loved it. Through the RISC story we pay a cultural debt we owe to RISC. It is story telling, about a time long gone, and the tale is mythical in nature. In opposition to the myth, as the article states, RISC by itself is no longer an ideal worth pursuing. This is relevant to the other Big Myth of our tech times, the Unix Story, and by extension to Linux. UNIX is mythical, h…

Listen, if you write a software system that puts more power at my disposal than Unix does, I'm happy to try it. But I suspect the Unix design has more wisdom in it than you think, because when I've tried to do better, even with the benefit of hindsight, I've always fallen short.

Re: The RISC Deprogrammer

#52

Earlier quoted context omitted.

We had a "sample" of this, at least according to the author, although it was in a less savory direction from those who care about memory safety and things like that: The M1 was optimized to run js shit faster apparently, which he claims is why the CPU is better for mobile machines (macbooks). Supposedly rust is too new for a new arch to design around it. Tbh, and may be this is just the limits of my imagination, but…

Here is the JS reference in the article. > For example, they added a lot of great JavaScript features, cognizant of the ton of online and semi-offline apps that are written in JavaScript. In contrast, Intel attempts to optimize a chip simultaneously for laptops, desktops, and servers, leading poorly optimizations for laptops. Now there is a JS feature in the M1. It's the FJCVTZS instruction "Floating-point Javascript…

Indeed, the few things I do already know of what the article talks about (very much including the javascript feature of the M1 you outline) are completely wrong, that makes the entire thing extremely suspect.

An other banger:

> Apple also does crazy things like putting a high end GPU (graphics processor) on the same chip.

They’re good but they’re not especially high-end, unless compared to other embedded GPUs like the ones in AMD’s APU, which… are rather comparable overall, and also single-die.

Re: The RISC Deprogrammer

#53

This "debunking" is itself mostly plausible-sounding bunk. It gets a lot of details simply wrong. For example, the 68030 wasn't "around 100000 transistors", it was 273000 [1]. The 80386 was very similar at 275000 [2]. By comparison, the ARM1 was around 25000 transistors[3], and yet delivered comparable or better performance. That's a factor of 10! So RISC wasn't just a slight re-allocation of available resources, it…

>whereas with a variable length instruction stream you need all sorts of interconnects between the decode units, and these interconnects add significant complexity and latency.

I find worth noting this is not always the case.

e.g. RISC-V C extension provides variable length instructions, but they're still either 16 or 32 bit.

Special care has been put into making the decoding overhead of dealing with this situation negligible, and it is indeed so. There's benefit, transistor-budget-wise, the moment there's any on-die cache or on-die rom. Any chip that's smaller than that is going to be very specialized and can simply omit C. In any chip that's larger, C is a net benefit.

As a practical example, the RISC-V based Ascalon by Jim Keller's team is a 8-wide (like M1), 10-issue CPU.

However, you're absolutely right the wild sort of variable instruction length that is seen in CISC architectures like x86 is a huge issue that massively complicates implementations and outright imposes a practical limit in decoder width.

OTOH in aarch64, the adoption of a fixed instruction size, thus tanking code density, was unenlightened to the point of brain-dead, we see the cache sizes M1/M2 need just to deal with this, and I'm afraid ARM will be gone for other reasons (non-technical, to do with mismanagement) before they have a chance to correct course and re-introduce compressed instructions.

As for the rest of the article, I generally agree with you that it presents outright wrong information as facts and then tries to push the wrong conclusion. It is utter bull, practically nothing of value can be found in there. I'm not even surprised, as it is pretty much the norm in RISC opposition.

Re: The RISC Deprogrammer

#54
post #19

> Back in the 1980s, most of the major CPUs in the world were big-endian, while Intel bucked the trend being little-endian. The reason is that some engineer made a simple optimization back when the 8008 processor... The article started talking about the VAX and how it was the gold standard everybody competed against. The VAX is little endian. Little endian is not a hack. It's a natural way to represent numbers. Its j…

> Little endian is not a hack. It's a natural way to represent numbers

To represent integers, for real numbers it's quite weird.

Re: The RISC Deprogrammer

#55

Earlier quoted context omitted.

Here is the JS reference in the article. > For example, they added a lot of great JavaScript features, cognizant of the ton of online and semi-offline apps that are written in JavaScript. In contrast, Intel attempts to optimize a chip simultaneously for laptops, desktops, and servers, leading poorly optimizations for laptops. Now there is a JS feature in the M1. It's the FJCVTZS instruction "Floating-point Javascript…

Indeed, the few things I do already know of what the article talks about (very much including the javascript feature of the M1 you outline) are completely wrong, that makes the entire thing extremely suspect. An other banger: > Apple also does crazy things like putting a high end GPU (graphics processor) on the same chip. They’re good but they’re not especially high-end, unless compared to other embedded GPUs like th…

I find it very frustrating. There are nuggets of interesting and relevant historical info and the central message of 'ISA isn't the most important thing for high end CPUs' is something I'd broadly agree with.

But it's all mixed with factual errors and iffy opinions (the Patterson and Hennessy textbook really isn't 'horrible').

Re: The RISC Deprogrammer

#56
post #21

Earlier quoted context omitted.

I don't think Rob has ever designed a single CPU, much less measured the effects of different tradeoffs.

To be fair, likely none of the readers here have designed a single CPU either :)

Some variation of designing, building or extending a CPU or ISA is standard in comp-sci curricula.

Re: The RISC Deprogrammer

#57
post #48
post #7

completely ignores the reason why RISC architectures took over .... the L1 I-cache moved on chip, suddenly the main reason for complex instruction encodings went away

While that was very important, wasn't the ARM2 with no cache significantly faster than contemporary CISC processors like the 80386 with no cache? I know Dhrystone isn't real but https://www.realworldtech.com/arms-race/2/ says an 8 MHz Archimedes got 4901 Dhrystones per second to the 16-MHz 386's 3626 Dhrystones per second. https://en.wikipedia.org/wiki/Instructions_per_second gives the 8-MHz ARM2 4 [Dhrystone] MIPS a…

Yes I think cache was an important motivator for some early designs (eg the IBM 801 - shameless plug below! [1]) as the central idea was that fast instruction cache would replace fast microcode store thus removing any code size penalty.

In fact I don't think code size was that much bigger for these designs so cache was probably less important than they initially thought.

The Arm team recognised that memory bandwidth was key for a cache less design and so designed to maximise this and make the most of it - hence the outperformance.

[1] https://thechipletter.substack.com/p/the-first-risc-john-coc...

Re: The RISC Deprogrammer

#58
post #49
post #19

> Back in the 1980s, most of the major CPUs in the world were big-endian, while Intel bucked the trend being little-endian. The reason is that some engineer made a simple optimization back when the 8008 processor... The article started talking about the VAX and how it was the gold standard everybody competed against. The VAX is little endian. Little endian is not a hack. It's a natural way to represent numbers. Its j…

I think it's neat that Arabic, where we got the numbers from, is an RTL language. From their point of view the numbers are little endian.

OTOH Arabic got its numerals from indic systems, and indic scripts are generally LTR, which points to big median being “more natural”. It also matches the spelling of positional numerals in most languages, and does make sense from a convenience point of view: when talking it’s easier to round off by just stopping as you go than to figure out what rounding you should apply beforehand.

If you spell out numbers in little-endian, once you start you’re committed to spelling it out in full, whereas big endian lets you stop at basically any point you feel like.

Re: The RISC Deprogrammer

#59

So, this is interesting so far and I'm bookmarking it for the depth of the author's historical knowledge, but saying "horizontal microcode" was the main difference that "no one talks about"...I mean I was told this was the very difference that make RISC distinct from x86 and friends (what I see now were VAX-like archs), the simpler transistor logic without the crazy micro-programs and the pipelining, I thought this w…

You're absolutely right. I was waiting to see what the big misunderstanding was about RISC, and I actually rolled my eyes when I saw _horizontal microcode_ bolded. It's an implementation detail.

Re: The RISC Deprogrammer

#60
post #16
post #8

Earlier quoted context omitted.

It kind of pushed their own definition of what RISC is. They also confuse the definition of what a 16-bit computer is and ignore the many commercial successes in 16-bit minicomputers such as the Nova. It is clever to point out that the most useful definition of RISC is that it’s a tradeoff. The point remains that a simplified ISA that’s easy to decode (and, more recently) implement dynamic reordering, will always hav…

>It kind of pushed their own definition of what RISC is. That's intentional. A straw man tends to be easier to attack.

I kind of agree there is no hard definition because what's "complex" and "reduced" are subjective things. The venerable 6502 was called "RISC before it was cool" and I have to agree its minimalistic ISA made it incredibly capable (and fast, clock for clock) compared to its more ambitious contemporaries such as the Intel 8080/8085, the Motorola 6809, and its arch-nemesis, the Z-80.
Post reply on HN