gpt4 book ai didi

javascript - 为什么 WebAssembly 这么慢?

转载 作者:行者123 更新时间:2023-11-29 08:36:21 26 4
gpt4 key购买 nike

<分区>

我正在使用 Rust 和 WebAssmbly 实现 Mandelbrot 集可视化,我的目标是使用多线程实现它。

到目前为止,我已经在 J​​avascript(使用 Typescript)和 Rust 单线程中实现了 Mandelbrot 集。我做了一些基准测试,Rust 实现大约慢了 x17 倍,我完全迷失在这里,我不知道为什么我会得到这么差的性能。

这是 repo,在 master 中使用 Rust 的实现,在 js-implementation 中使用 Rust 的实现。

https://github.com/DanielRamosAcosta/mandlerbot-set-webassembly

提前致谢。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com