TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Real-World WebAssembly Benchmark

243 pointsby MartinMondalmost 7 years ago

19 comments

bjpirtalmost 7 years ago
Personal WASM anecdote: I just implemented a WASM based 3d model boolean operation for three.js where I can intersect two models together. The pure js version ran in around 10s on a relatively simple model whereas the WASM version did the same thing in a little under 1s. I've been very impressed by the technology so far! Obviously this kind of CPU intensive work is where it can shine and it's a useful tool to have in your toolkit.
评论 #17464458 未加载
评论 #17465460 未加载
评论 #17465142 未加载
MartinMondalmost 7 years ago
PSPDFKit CTO here: We&#x27;ve been using WebAssembly since 2017 to render PDF documents directly in the browser and strongly believe in the future of the technology.<p>We published this benchmark to have a public indicator of the performance gains WebAssembly promises in a real-world product.
评论 #17465843 未加载
评论 #17467209 未加载
评论 #17465121 未加载
评论 #17470622 未加载
markdog12almost 7 years ago
Firefox crushing the competition on this (all on iMac late 2015):<p><pre><code> Firefox Nightly: 2216 Chrome Canary: 5078 Safari Tech Preview 60: 7216 </code></pre> Brand new iPad 2018: 16653<p>Moto G4 phone Chrome: 37735<p>Windows 10 Laptop:<p><pre><code> Firefox Nightly: 2278 Chrome Canary: 4907 Edge: 16332</code></pre>
评论 #17467497 未加载
评论 #17466222 未加载
评论 #17467229 未加载
评论 #17464805 未加载
评论 #17468201 未加载
评论 #17466054 未加载
评论 #17468040 未加载
ebikelawalmost 7 years ago
OR I can just read and edit PDFs in the peak-optimized, ahead-of-time-compiled native PDF reader that comes on my computer.
评论 #17464648 未加载
评论 #17464839 未加载
评论 #17464661 未加载
评论 #17468439 未加载
tokyodudealmost 7 years ago
FYI: WebAssembly is effectively starting to get WebAssembly only APIs. Chrome is shipping the WebGL commit API which is designed to support spin loops in native apps (others are expected to ship it too)<p>Most native OpenGL apps run in a spin loop as in<p><pre><code> while(true) { update(); render(); glSwapBuffers(); } </code></pre> To support that model TPTB added a worker only `gl.commit` function that does effectively the same thing as `glSwapBuffers` so that native apps can keep their spin loops and don&#x27;t have to refactor to be event based.<p>Of course if you decide to use a `gl.commit` spin loop your worker can no longer receive events (no onmesagge, no XHR, no websockets, no fetch) so you&#x27;re supposed to use SharedArrayBuffers to communicate with a spin loop worker.<p>SharedArrayBuffers are being re-enabled once they are isolated to same domain only processes.<p>AFAICT this is the first browser API that is really targeted exclusively at WebAssembly. I&#x27;m guessing more will come. Not entirely sure how I feel about that but I guess it&#x27;s inevitable.
评论 #17470432 未加载
KaoruAoiShihoalmost 7 years ago
&gt; The team was especially helpful in pointing out bottlenecks in our JavaScript implementation, and we’re already incorporating these changes into our next PSPDFKit for Web release.<p>Any chance you can talk about those bottlenecks? Might be interesting.
stcredzeroalmost 7 years ago
We should be at the point where network computers are practical for casual users. A full install of the BeOS operating system is just 45MB. A tricked-out one was barely more than a couple of hundred MB. We should now be able to have operating systems which are mostly cached from online connections, running in clients like Web Browsers, but purpose built for running such an OS.
symboltoprocalmost 7 years ago
What&#x27;s the difference to benchmarks like <a href="https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2018&#x2F;01&#x2F;oxidizing-source-maps-with-rust-and-webassembly&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2018&#x2F;01&#x2F;oxidizing-source-maps-with...</a>? The results seem vastly different.
评论 #17464220 未加载
singularity2001almost 7 years ago
the standalone version produces a dom tree?<p>I expected canvas rendering, which would be MUCH faster. (?)<p>&lt;div style=&quot;top: 628.75px; left: 125px; position: absolute; transform-origin: 0px 0px 0px;&quot;&gt;&lt;label style=&quot;width: 38px; height: 38px;&quot; class=&quot;PSPDFKit-43pb73xrbckjuggksebahxjw9 PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-CheckBox&quot;&gt;&lt;input name=&quot;Checkboxes 2&quot; value=&quot;Checkboxes&quot; type=&quot;checkbox&quot;&gt;&lt;span class=&quot;PSPDFKit-v4b9qprfhz2hybx1p43s4xgx6 PSPDFKit-8vpzte5r65p8pf9q4d61qcb34u&quot; style=&quot;border-width: 1.25px;&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;label&gt;&lt;&#x2F;div&gt;
评论 #17467707 未加载
Matthias247almost 7 years ago
&gt; Browser vendors can reach out to us and obtain a more permissive license key so that the benchmark can run on different machines and even on their continuous integration servers.<p>Sounds like a great idea for encouraging performance improvements and avoiding regressions!
yandrypozoalmost 7 years ago
wondering why those benchmarks weren&#x27;t run on Linux distros like Ubuntu, Debian, etc.
billyboltonalmost 7 years ago
Now all we need is to expose a graphics context to wasm. No need for DOM support.
评论 #17467366 未加载
aioprisanalmost 7 years ago
Great work, looks like a very useful PDF toolkit. I&#x27;ve been working on a side project implementing something similar for some time but has stalled due to life getting in the way. Can you share anything publicly in terms of pricing?<p>I see everything is through a sales person now and I&#x27;d like to get a better high level understanding of high level costs for passion projects (&lt;1000 users), small-medium (&lt;100k), and enterprise (1M+). What metrics are you charging usage on?
评论 #17465426 未加载
krzyzanowskimalmost 7 years ago
Safari is so slow
评论 #17464605 未加载
thosakwealmost 7 years ago
One thing that would be super nice, in theory, would be compiling WASM modules on-the-fly from the text format.<p>In a sense, it would be like a JIT for the Web, and one possibility for bringing existing JIT-based languages to WASM.
评论 #17464694 未加载
KaoruAoiShihoalmost 7 years ago
What is the most performant compile to wasm language? Or are they all similar?
评论 #17464788 未加载
评论 #17464761 未加载
评论 #17464807 未加载
评论 #17465299 未加载
bigatoalmost 7 years ago
&gt; In the future, Microsoft wants to bring more features — which are currently not possible in asm.js (or JavaScript) — to WebAssembly.<p>This is very vague, but already disturbing
评论 #17464402 未加载
评论 #17465209 未加载
评论 #17469782 未加载
评论 #17465006 未加载
mrmondoalmost 7 years ago
- Firefox 62b5: 1429<p>- Chromium 68: 5722<p>- Safari 11.1.1: 6500<p>On 2017 Macbook pro running macOS 12.13.5 on battery power
owaislonealmost 7 years ago
I tried on Ubuntu 18.04. Firefox around 2k and Chrome around 10k