GithubHelp home page GithubHelp logo

Would wasm make it any faster? about zdog HOT 3 OPEN

ryansupak2 avatar ryansupak2 commented on June 11, 2024
Would wasm make it any faster?

from zdog.

Comments (3)

desandro avatar desandro commented on June 11, 2024

Zdog source code is built to be run in the browser without compilation. It's designed to be a browser plugin — although in theory, it could be ported to other rendering engines.

As for WASM WebAssembly — I don't have any expertise here. Zdog is based on <canvas> which has a JS API. I'm not familiar with low-level shape rendering API that browsers use. I'm curious to here where any benefit could be.

from zdog.

ryansupak2 avatar ryansupak2 commented on June 11, 2024

Hi! I'm by no means an expert on this but I think the key advantage of WASM in this case is that it might make performance across browsers and platforms more consistently-optimal. If your JS is already super-tight (and I suspect it is), it probably won't make it much faster in the situations and platforms where it's already fast.

But: if there are some browsers or platforms where your JS underperforms, retooling it in something like AssemblyScript (which is a WASM compiler for TypeScript) might make it more consistently-fast:

https://www.youtube.com/watch?v=njt-Qzw0mVY&t=1375s

from zdog.

mootari avatar mootari commented on June 11, 2024

@ryansupak2 Why don't you start with a performance profile to find the actual bottlenecks, ideally in a way that can be replicated by others?

from zdog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.