Coder Social home page Coder Social logo

asm.js about seedrandom HOT 4 OPEN

davidbau avatar davidbau commented on September 25, 2024
asm.js

from seedrandom.

Comments (4)

davidbau avatar davidbau commented on September 25, 2024

Unfortunately, "jsperf is temporarily unavailable" is what we've been getting for a while, and I haven't been able to see the code that you created. Can you write what you had in mind in this issue?

I had been reluctant to depend on typed arrays (for old browser compatibility) but perhaps it's time to start using them if there is a significant speed benefit. I'd be open to patches with benchmarks.

from seedrandom.

jeffrose avatar jeffrose commented on September 25, 2024

It wasn't my jsperf but it showed a comparison of the same algorithm implemented in both asm.js and plain JavaScript. The asm.js version performed better.

It looks like using typed arrays would only exclude IE8 and IE9 unless a Uint8ClampedArrayis used then IE10 would be excluded as well.

http://caniuse.com/#feat=typedarrays

So it's a matter of how important is IE8-9 support to you. If someone needs support for those browser, they could always load a polyfill beforehand.

Typed arrays aside, the use of asm.js would be ignored by browsers that don't support it. That is, the code would just execute like regular JavaScript.

Personally I've never used asm.js in my own development, but it seems like crypto is a decent use case for it.

from seedrandom.

CoDEmanX avatar CoDEmanX commented on September 25, 2024

JSPerf seems to work (again), and if I read the results correctly, asm.js outperforms normal JS by factor 10 in Firefox.

from seedrandom.

jeffrose avatar jeffrose commented on September 25, 2024

It is a pretty significant performance difference.

screen shot 2016-01-14 at 10 55 06 am
screen shot 2016-01-14 at 11 03 44 am

from seedrandom.

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.