-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matrix例子中 为什么webAssembly用时比js更长呀 #7
Comments
如题 |
现在 js 引擎的优化已经很厉害了,尤其是对 for 循环。 wasm 在浏览器里复用的是一部分 js 引擎的实现,性能还不行,跑在独立的 runtime 里会好一些。 |
哦哦明白啦!谢谢您~ 还想问一下,最近我想研究 用webAssembly提高浏览器执行canvas或者webGL等一些渲染任务的速度,不知道可行嘛?
…---原始邮件---
发件人: "Hanks"<notifications@github.com>
发送时间: 2019年11月13日(星期三) 晚上7:25
收件人: "Hanks10100/wasm-examples"<wasm-examples@noreply.github.com>;
抄送: "Author"<author@noreply.github.com>;"tttousa"<1121755070@qq.com>;
主题: Re: [Hanks10100/wasm-examples] matrix例子中 为什么webAssembly用时比js更长呀 (#7)
现在 js 引擎的优化已经很厉害了,尤其是对 for 循环。 wasm 在浏览器里复用的是一部分 js 引擎的实现,性能还不行,跑在独立的 runtime 里会好一些。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
可以自己实验一下。 wasm 不是很适合做渲染,做高性能运算还可以,主要是目前 js 和 wasm 之间的传值效率不够高,如果频繁互相调用的话,挺影响性能的。 另外 wasm 是跑在 CPU 里的,大部分和 js 一样用在主线程里,浏览器主线程已经够忙的了, WebGL 可以写 shader 跑在 GPU 里,用它做渲染性能更好一些。 |
好嘞!再次感谢您的回复!
…---原始邮件---
发件人: "Hanks"<notifications@github.com>
发送时间: 2019年11月15日(星期五) 上午10:06
收件人: "Hanks10100/wasm-examples"<wasm-examples@noreply.github.com>;
抄送: "Author"<author@noreply.github.com>;"tttousa"<1121755070@qq.com>;
主题: Re: [Hanks10100/wasm-examples] matrix例子中 为什么webAssembly用时比js更长呀 (#7)
可以自己实验一下。 wasm 不是很适合做渲染,做高性能运算还可以,主要是目前 js 和 wasm 之间的传值效率不够高,如果频繁互相调用的话,挺影响性能的。
另外 wasm 是跑在 CPU 里的,大部分和 js 一样用在主线程里,浏览器主线程已经够忙的了, WebGL 可以写 shader 跑在 GPU 里,用它做渲染性能更好一些。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: