4 ms·
> more than 30x faster than MicroPython on an ESP32 Based on a quick look at the file “interpreter_run.cc”, Toit’s VM appears to be a stack-based interpreter l
by pansa2 5y ago
> more than 30x faster than MicroPython on an ESP32
Based on a quick look at the file “interpreter_run.cc”, Toit’s VM appears to be a stack-based interpreter like MicroPython’s. It would be interesting to know what techniques are being used that enable Toit to be so much faster.
- kasperl 5y agoAmong other things, Toit uses the selector-based row displacement technique for building a compact method dispatch table that can be queried in constant time. If you're into fast virtual method calls - also for dynamic languages - you might want to take a look at Karel Driesen's excellent PhD dissertation on the subject: https://cs.ucsb.edu/sites/default/files/documents/1999-24.ps https://cs.ucsb.edu/sites/default/files/documents/1999-24.ps
- kasperl 5y agoOh, and full disclosure: I'm the author of the blog post.
- tomp 5y agois this the disertation (.pdf link)? http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.5449&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34....
- floitsch 5y agoIt's this one: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29.8713&rep=rep1&type=pdf https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29...
- deleted 5y ago[deleted]
- matt_trentini 5y agoSome, you know, _actual benchmarks_ might be nice too. The claims are certainly possible, but somewhat hollow without evidence...