GithubHelp home page GithubHelp logo

Comments (2)

bradleypeabody avatar bradleypeabody commented on April 28, 2024

Another observation on this is that the wasm code emitted right now by the Go compiler uses a loop algorithm http://troubles.md/posts/why-do-we-need-the-relooper-algorithm-again/ to allow the necessary jump/resume functionality to get things like panic/defer/recover/goroutines to work. And although there is not much we can easily do about the runtime performance, this may be a clue to some excellent domain-specific compression ideas. Nested blocks and local.get/local.set and a few other instructions consume portions of the generated code. It might be possible to use something as simple as a predefined dictionary with flate to get good compression ratios. Some testing should be done. There are also potentially other repetitive patterns that could lend themselves to compression, like br N ... end ... br N-1 ... end ... br N-2 ... end and so on.

This sort of compression could prove even more useful than trying to break up and cache different packages.

from vugu.

bradleypeabody avatar bradleypeabody commented on April 28, 2024

It would also be really helpful to have an analysis tool which showed what functions and packages were consuming the most space. Disassembling a program and just measuring the byte size of each package would be really helpful. For example the Vugu website binary has loads of syntax highlighting code in it where I only need one of the many included, and the linker seems to have been unable to optimize the others way (probably because of import side-effects/init).

With good domain-specific compression and visibility about what is bloating the code, this might mitigate the binary size situation significantly.

from vugu.

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.