Giter Club home page Giter Club logo

Comments (4)

louisremi avatar louisremi commented on May 31, 2024 1

Ok, so I tested your updated implementation vs. the one I was suggesting: https://esbench.com/bench/5857b9b0d5686f990078bb32
My tests show that both implementations run equally fast in Firefox, and that the double atan2 implementation runs 4 times slower in Chrome (Firefox seems 10x faster on this micro-bench). So I'd say let's stick with your implementation.

from bezierjs.

Pomax avatar Pomax commented on May 31, 2024

angle got simplified in v2.2.2, so the only benefit would be "angle between three points". As a bezier library, what goes in utils is mostly based on "does the library itself need it", rather than "is it useful on its own", because the latter shouldn't be in the bezier-specific utils file =)

For deciding whether to keep the current angle, or use yours, I'd be interested in seeing the perf difference. Would you be interested in seeing if you can get numbers associated with both functions?

from bezierjs.

louisremi avatar louisremi commented on May 31, 2024

Sure, I'll do that as soon as jsperf.com is back online :-)
jsperf/jsperf.com#289

from bezierjs.

Pomax avatar Pomax commented on May 31, 2024

that is not happening any time soon, jsperf is down because it could not prevent itself from getting hammered, without a solution in sight. But you don't need jsperf, writing your own timer in node/browser is pretty easy

from bezierjs.

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.