koute / polkavm

A fast and secure RISC-V based virtual machine
Apache License 2.0
234 stars 47 forks source link

Explore a SIMD-friendly instruction encoding format #81

Closed koute closed 2 months ago

koute commented 8 months ago

Using varints instead of u32s for the instruction stream costs us ~15% of compilation performance, which is relatively huge. We should switch to a SIMD-friendly format to make the decoding even faster than just using u32.

An approach inspired by something like this would probably work pretty well: https://arxiv.org/abs/1709.08990