By: Anon (no.delete@this.spam.com), August 3, 2022 9:25 am
Room: Moderated Discussions
NoSpammer (no.delete@this.spam.com) on August 3, 2022 7:55 am wrote:
> So mainstream architectures that used to use stack-like structures like intel x87
> and archs using register windows being obsoleted are not a practical proof?
But there is another way to explain that, stacks were very unfriendly to in order superscalar CPUs, then anyone caring about performance stoped using stacks and we continue not using by inercia.
When CPUs implemented stack engines the difference reduced a lot, but nobody wanted to go back using stacks anymore.
> I think it's quite clear that is not a compiler friendly target for current compiler tech.
Wrong. Have you ever write a compiler? Targeting a stack is much easier than a register based architecture, Java and .Net intermediate languages are stack based exactly because of that.
> It's also quite clear that you will be burning power resolving a layer of indirection.
And burning less power by loading less code, it is not clear to me which would be lower.
> It's also quite clear that you will be wasting time shuffling stack order at many block edges.
As this would be done in parallel to actual execution the is no wasted time.
I don't know if it is possible to design a high performance stack based archtecture, I think it is, but I also know nobody have tried.
> So mainstream architectures that used to use stack-like structures like intel x87
> and archs using register windows being obsoleted are not a practical proof?
But there is another way to explain that, stacks were very unfriendly to in order superscalar CPUs, then anyone caring about performance stoped using stacks and we continue not using by inercia.
When CPUs implemented stack engines the difference reduced a lot, but nobody wanted to go back using stacks anymore.
> I think it's quite clear that is not a compiler friendly target for current compiler tech.
Wrong. Have you ever write a compiler? Targeting a stack is much easier than a register based architecture, Java and .Net intermediate languages are stack based exactly because of that.
> It's also quite clear that you will be burning power resolving a layer of indirection.
And burning less power by loading less code, it is not clear to me which would be lower.
> It's also quite clear that you will be wasting time shuffling stack order at many block edges.
As this would be done in parallel to actual execution the is no wasted time.
I don't know if it is possible to design a high performance stack based archtecture, I think it is, but I also know nobody have tried.