3 ms·
I wonder how this compares to QuickJS. https://bellard.org/quickjs/ https://bellard.org/quickjs/
by steve_taylor 4y ago
I wonder how this compares to QuickJS.
https://bellard.org/quickjs/ https://bellard.org/quickjs/
- Andoryuuta 4y agoThere are some insights/comparisons in speed and memory usage in the Frida 14.0 [0] release notes, when they switched from Duktape to QuickJS. Overall, QuickJS seems to be slightly more performant and requires about a fifth of the memory usage for the runtime. [0]: https://frida.re/news/2020/10/28/frida-14-0-released/ https://frida.re/news/2020/10/28/frida-14-0-released/
- lioeters 4y agoFigma has some articles on their plugin system, for which they considered Duktape, then Realms shim, and finally settled on QuickJS. How to build a plugin system on the web and also sleep well at night - https://www.figma.com/blog/how-we-built-the-figma-plugin-system/ https://www.figma.com/blog/how-we-built-the-figma-plugin-sys... An update on plugin security - https://www.figma.com/blog/an-update-on-plugin-security/ https://www.figma.com/blog/an-update-on-plugin-security/
- jitl 4y agoI’ve open-sourced an implementation of these ideas, see related comment here: https://news.ycombinator.com/item?id=31970198 https://news.ycombinator.com/item?id=31970198
- zzo38computer 4y agoSome of the extensions look like good idea, such as extended JSON, and ignoring shebang lines (although I think that they might have wanted to make this standard). It will be useful to have variants of loadFile and some other functions that currently deal only with UTF-8 strings: [1] UTF-8 [2] ISO-8859-1 [3] ArrayBuffer Currently, only urlGet has a variant using ArrayBuffer, although it would be useful to allow that for loadFile too, to avoid having to open and measure and close the file to do it by yourself. Additionally, urlGet lacks some of the options of curl (such as whether or not to follow redirects). Typed arrays may also be necessary for command-line arguments and environment variables and file names in some cases, where they might not be valid UTF-8 (it is not guaranteed that they will be; this depends on the file system in use, though, since some are always Unicode; however, some allow mismatched surrogates so this must also be permitted). (Node.js allows this for file names, but it seems not for command-line arguments and environment variables.) Additionally, the locale might or might not be Unicode, but even if it is, that does not necessarily mean that the other things are. Assuming that everything is UTF-8 is an invalid assumption (it might not even be text in any encoding at all; it might even be null-terminated binary data), and programs that deal with Unicode often incorrectly ignore the locale.