8 ms·
The history of "higher level" instructions isn't good. The DEC VAX had an assembly language intended to make life easier for assembly programmers, but it slowed
by Animats 10y ago
The history of "higher level" instructions isn't good. The DEC VAX had an assembly language intended to make life easier for assembly programmers, but it slowed the machine down. The Intel IAPX 432 had lots of bells and whistles, but was really slow. The RISC machines with lots of registers turned out not to be all that useful, and too much register saving and restoring was required. RISC is a win until you want to go superscalar and have more than one instruction per clock. Then it's a lose. Stack machines that run some RPN form like Forth or Java code have been built, but don't go superscalar well.
A useful near-term feature would be zero-cost hardware exceptions on integer overflow. This is an error in both Java and Rust, and tends to be turned off at compile time because it has a performance penalty. The problem is that people will want to be able to unwind and recover, which means exact exceptions and a lot of compiler support for them.
If you could figure out how to do zero-cost subscript checking, that would be a step forward. That check needs additional info about bounds, which usually means a delay.
I used to be a fan of schemes for safely calling from one address space to another. i386 almost has this, with call gates, which don't quite do enough to be useful. A few machines have had hardware context switching, but that hasn't been a big performance improvement. All that has to be tightly integrated with the OS or it's a lose. It's an enhancement to Plan 9, not anything anybody uses.
The same is true of fancy schemes for inter-CPU communication, but that probably needs more attention. Like it or not, we have to figure out what to do with large numbers of non-shared-memory CPUs. Some way to set up memory-safe message passing between non-shared-memory CPUs without involving the OS after setup would be useful.
An IOMMU that allows drivers in user space with minimal performance degradation is a good thing. Those exist.
- i336_ 10y ago> Stack machines that run some RPN form like Forth or Java code have been built, but don't go superscalar well. I've been interested in Forth (and related stack) processors for a while, and my armchair observations over a few months have suggested that the (much-vaunted) performance gains associated with such processor designs are apparently not straightforward to map or relate to or take advantage of. I remember (unfortunately not sure where right now) reading how the GA144 was built at a time when 18-bit memory was the current trending novelty and that it's not really a perfect processor design. I'm still fascinated by it though (sore lack of on-chip memory notwithstanding). What sort of scale are you referring to when you say "superscalar"? 144 processors? 1000? Do stack-based architectures remain a not-especially-practical-or-competitive novelty, or are they worth pursuing outside of CompSci? (FWIW, everything else you've written is equally interesting, but slightly over my current experience level)
- hvidgaard 10y agoSuperscalar is not about the number of processors, but a single cores ability to run multiple instructions in parallel. The most well known example of this is SIMD.
- minipci1321 10y ago> to run multiple instructions in parallel. > The most well known example of this is SIMD. SImd == Single Instruction (multiple data). Correct explanation, unsuitable illustration.
- hvidgaard 10y agoSIMD is an example of super scalar design. It is running multiple instructions in parallel, they all just happen to be the same instruction. I could have said MIMD, but that is not a term that is well known.
- gpderetta 10y agoI wouldn't call SIMD superscalar. The complexity of a superscalar design is being able to track multiple instructions, their dependencies and their out of order completion [1]. Classical SIMD machines run every lane in lock step. [1] not OoO issue, that would be a proper Out Of Order CPU.
- hvidgaard 10y agoIt's a classical example of how much definition matters. Though, if we define superscalar to mean the instructions can run independenly (i.e. not in lockstep), then I agree that a single SIMD unit is not superscalar. But a design with 2 SIMD units that operate on 2 different data steams independently would be be a superscalar design.
- gpderetta 10y ago
- acqq 10y ago> A useful near-term feature would be zero-cost hardware exceptions on integer overflow. I see this mentioned regularly. Has anybody actually measured that performance penalty? I'd really like to see the benchmarks and the code samples (both the high-level and the machine code). Because at the machine code level it's just checking a single flag after the operation that could have resulted in an overflow, and only if there's an overflow more exception code has to be executed. And nobody should program the execution paths where the exceptions happen much more often than not? If there's a need for an explicit check (like when implementing bignum routines) there should be a real language feature for that, that is, something the language designers should do, not the CPU designers.
- fulafel 10y agoThe Rust people did, it then became a discussion about sufficiently smart compilers. I'd imagine from a compiler engineering standpoint, it't pretty hard to make this performance neutral. It makes all the artichmetic loops into non-leaf nodes in the call graph and so has second order effects in optimization passes.
- hinkley 10y agoIf your parameters have known ranges you could elide a lot of checks. You're not going to overflow multiplying an 8 bit number times a 16 bit number, for instance.
- CalChris 10y agoAnother thing the 432 ISA was was dense with bit aligned variable length instructions ranging from 6 bits to 100s. This solved a 70s problem. A very successful high level architecture is the IBM System 38. Not as sexy as the 432 but they sold a lot of systems.
- gpderetta 10y ago> RISC is a win until you want to go superscalar and have more than one instruction per clock. Uh? ARM, SPARC, POWER are doing just fine in the superscalar domain (heck, power8 is 8 wide!). I don't think they have any particular advantage with regard to CISCy x86 (other than a simpler, more scalable, decoder) but don't have any disadvantage either.
- kutkloon7 10y agoYou're right. RISC is more suitable for superscalar processing. According to https://en.wikipedia.org/wiki/Superscalar_processor#History https://en.wikipedia.org/wiki/Superscalar_processor#History, RISC microprocessors were the first ones to implement superscalar execution.