Hacker News new | ask | show | jobs
by jasonzemos 1481 days ago
After this gained prominence I took a hard read of Koopman's Stack Computers: The New Wave intent on writing an interpreter. I sought some optimization properties that would apply to the modern requirements for ILP, OoE and parallelization at low core frequencies -- none are offered. This manifests in WASM, and the criticism was elaborated very well: http://troubles.md/posts/wasm-is-not-a-stack-machine/

> This essentially makes WebAssembly a register machine without liveness analysis, but not only that, it’s a register machine that isn’t even in SSA form - both of the tools at our disposal to do optimisation are unavailable. In a true, optimising compiler we can recreate that information, but WebAssembly was already emitted by a compiler that generated that information once.

3 comments

Sadly, the compiler/software optimization for stack machines is a neglected field in computer architecture evolution.

If you are interested in this, you might find these useful.

1) Optimisation Techniques for Stack Based Architectures - Christopher Bailey

2) Investigating Opportunities for Instruction-Level Parallelism for Stack Machine Code - Shi Huibin

3) Second-Generation Stack Computer Architecture - Charles Laforest

[1] https://www-users.cs.york.ac.uk/~chrisb/main-pages/publicati...

[2] https://www-users.cs.york.ac.uk/~chrisb/main-pages/publicati...

> ILP, OoE

Moron here, what is that in this context?

You're not a moron. The use of acronyms (yeah, yeah, "initialisms") is bad writing unless you are 98% sure that your audience is familiar with them.
Its a comment chain on a tech site not an introductory article.

(Nothing wrong with not being familiar, i wasn't either, but it was totally reasonable for original poster to use them in context)

> Its a comment chain on a tech site not an introductory article.

Yes, but it's a tech site with a broad audience. I still think it's nicer to avoid any but the most commonly understood acronyms. It's a hard call to make but there's no harm erring on the side of caution.

Maybe I'm too prickly on this topic. In this particular case I think it's probably OK but I often see people misjudge this to the point where it's genuinely confusing for most of the audience.

ILP: Instruction Level Parallelism OOE: Out of Order Execution
You'd like the browser to run code optimization phases?
With a JIT, the only question is which optimisations are worth the effort.
It does already. Wasm compilers in browsers do tiering and inlining.