fwsGonzo / libriscv

The fastest RISC-V sandbox
BSD 3-Clause "New" or "Revised" License
526 stars 46 forks source link

Tail-call performance is abit weak #97

Closed fwsGonzo closed 7 months ago

fwsGonzo commented 8 months ago

Tail-call dispatch is fully supported now, but the performance is worse than the threaded dispatch. I suspect that slow-paths are causing poor code generation.

fwsGonzo commented 8 months ago

Very slightly improved with https://github.com/fwsGonzo/libriscv/commit/ac4f904f06f42332511ce4a2cf739b9f1f8110f8

fwsGonzo commented 7 months ago

This is something that would probably need better compiler support in order to make progress on. Calls out of the tailcall-chain is too costly right now, and tricking the compiler like v8 does is not in the cards.