TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

InNative: Run WebAssembly Outside the Sandbox at 95% Native Speed

172 点作者 blackhole将近 6 年前

9 条评论

rkagerer将近 6 年前
For those curious why it isn&#x27;t 100%:<p><i>The only reason we haven’t already gotten to 99% native speed is because WebAssembly’s 32-bit integer indexes break LLVM’s vectorization due to pointer aliasing. Once fixed-width SIMD instructions are added, native WebAssembly will close the gap entirely, because this vectorization analysis will have happened before the WebAssembly compilation step.</i>
feniv将近 6 年前
WebAssembly on desktop and servers is maturing pretty rapidly! There are several backend interpreters already in Rust and Go (life). The native, compiled options are even faster, Fastly&#x27;s Lucet compiler and runtime was one of the first to implement WASI (<a href="https:&#x2F;&#x2F;wasi.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasi.dev&#x2F;</a>): <a href="https:&#x2F;&#x2F;www.fastly.com&#x2F;blog&#x2F;announcing-lucet-fastly-native-webassembly-compiler-runtime" rel="nofollow">https:&#x2F;&#x2F;www.fastly.com&#x2F;blog&#x2F;announcing-lucet-fastly-native-w...</a><p>The differentiator for InNative seems to be the ability to bypass the sandbox altogether as well as additional native interop with the OS. Looks promising!
评论 #20027606 未加载
p1necone将近 6 年前
<a href="https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death-of-javascript" rel="nofollow">https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death...</a><p>We&#x27;re well on our way.
评论 #20028410 未加载
mises将近 6 年前
&quot;Run a fast, sandboxed bytecode outside of the sandbox by compiling it into a binary&quot; so just a binary. I&#x27;m not sure I understand why you would use wasm here. No one writes wasm; you compile to it (usually from llvm ir). Why couldn&#x27;t you just go straight from llvm ir to a binary; skip the wasm? I suspect I&#x27;m missing something here, but it doesn&#x27;t seem to make sense.
评论 #20026179 未加载
评论 #20026523 未加载
评论 #20026140 未加载
评论 #20027991 未加载
评论 #20026154 未加载
ryacko将近 6 年前
&quot;We could break the stranglehold of i386 on the software industry and free developers to experiment with novel CPU architectures without having to worry about whether our favorite language compiles to it.&quot;<p>WASM is equivalent to early 80s ISAs but with different opcodes. Native WASM would be most efficient.
评论 #20026390 未加载
评论 #20026889 未加载
评论 #20026116 未加载
评论 #20030139 未加载
评论 #20027821 未加载
Matheus28将近 6 年前
Isn’t it also using 32 bit pointers on 64 bit machines? That should also improve performance a bit.<p>It’s a shame that the x32 ABI is almost abandoned nowadays, it has some modest improvements for applications that don’t need that much memory.
评论 #20102879 未加载
liquid153将近 6 年前
WASM sounds great and all with it’s sandbox like NaCl. But I have to imagine over 90% of client and server computers are x86 and ARM and I don’t see those targets losing any share in the near or long term. Also I don’t see wasm being used in micro controllers as well.
AshleysBrain将近 6 年前
Isn&#x27;t the sandbox a useful feature of WebAssembly? It gives you much better security guarantees than running untrusted native code on your system.
评论 #20029042 未加载
microcolonel将近 6 年前
Alternatively: run native code at least 5% slower than before.
评论 #20027639 未加载
评论 #20030576 未加载