X 归档 2025-03-12
@evanyou for those that don't know, go's subpar perf on wasm actually has nothing to do with gc, and everything to do with context switching between goroutines.
you can see https://github.com/golang/go/issues/65440, but effectively if/when https://github.com/WebAssembly/stack-switching is done, we should see major perf gains.
you can see https://github.com/golang/go/issues/65440, but effectively if/when https://github.com/WebAssembly/stack-switching is done, we should see major perf gains.
@evanyou 给不了解情况的人说一下:go 在 wasm 上性能不佳,其实和 gc 没有任何关系,全都归因于 goroutine 之间的上下文切换。
可以看 https://github.com/golang/go/issues/65440,总之等 https://github.com/WebAssembly/stack-switching 完成,我们应该就能看到巨大的性能提升。
可以看 https://github.com/golang/go/issues/65440,总之等 https://github.com/WebAssembly/stack-switching 完成,我们应该就能看到巨大的性能提升。
@sanxiaozhizi How about compiling to js instanceof wasm? It may be possible to avoid the performance problems caused by the absence of some low-level features in wasm.
@sanxiaozhizi 编译成 js 而不是 wasm 怎么样?这样或许可以避开 wasm 因缺少某些底层特性而带来的性能问题。
rewrite Swift compiler in Go for 10x faster performance
用 Go 重写 Swift 编译器,性能提升 10 倍


