Performance of Devicescript #179
-
How fast will the compiled code run in comparison to native C/C++ ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Here is a paper we did on a previous project that was compiling TS to native ARM code. https://www.microsoft.com/en-us/research/uploads/prod/2019/09/static-typescript-draft2.pdf DeviceScript is using a VM interpreter which is slower (but portable - we currently run on RISC-V, ARM, Xtensa, x86, WASM, and probably much more). For low level manipulations I would guess anything between 10x-100x. Also note that high performance is not the primary goal here - the goal is good developer experience. We'll work on perf when it becomes a problem (possibly using methods from the article linked above). |
Beta Was this translation helpful? Give feedback.
-
I assume that I am a little bit misled by the positive performance figures of WAMR (ByteAlliance) as they looked very promising for an MCU-independent VM. |
Beta Was this translation helpful? Give feedback.
Here is a paper we did on a previous project that was compiling TS to native ARM code.
https://www.microsoft.com/en-us/research/uploads/prod/2019/09/static-typescript-draft2.pdf
DeviceScript is using a VM interpreter which is slower (but portable - we currently run on RISC-V, ARM, Xtensa, x86, WASM, and probably much more).
For low level manipulations I would guess anything between 10x-100x.
Also note that high performance is not the primary goal here - the goal is good developer experience. We'll work on perf when it becomes a problem (possibly using methods from the article linked above).