what happens to the js code inside EM_ASM?

假装没事ソ 提交于 2019-12-24 08:35:39

问题


In Enscripten what happens to the code inside EM_ASM function? I mean if that code get compiled or interpreted at runtime? If compiled then if that runs faster or slower than native interpreted js in browser?


回答1:


Basically it'll place that code inside your .js file and the Emscripten code will call it. It will have the exact same performance as any other JS code, excepting any performance penalty caused by switching from the Wasm to JS code.



来源:https://stackoverflow.com/questions/50665429/what-happens-to-the-js-code-inside-em-asm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!