Git Product home page Git Product logo

Comments (5)

olivernn avatar olivernn commented on August 11, 2024

Thanks for the link, currently augment is using the trim2 implementation from that list which looks fairly good performance wise. I'll certainly do a few benchmarks on some more browsers with the suggested trim1 implementation though.

from augment.js.

olivernn avatar olivernn commented on August 11, 2024

I'm going to close this issue for now, after running benchmarks against the current implementation and the suggested implementation in IE there was nothing between the two versions performance wise.

from augment.js.

Boldewyn avatar Boldewyn commented on August 11, 2024

Have you looked at trim2, or did you benchmark trim10 and trim11, too? The one at the very end of the article seems to be the hottest candidate.

from augment.js.

olivernn avatar olivernn commented on August 11, 2024

I actually benchmarked trim1, trim2 (which is what is currently implemented) and trim 12, the one at the bottom of the article.

The difference between trim1 & trim2 was negligible. Trim 12 was much slower on any string that had any trailing spaces, and slightly quicker on strings with leading white spaces.

I've pushed the performance test that I did up on a branch, feel free to try it out yourself, perhaps my tests are flawed in some way?

from augment.js.

Boldewyn avatar Boldewyn commented on August 11, 2024

The tests look good, so yes, I officially draw back the issue :-)

from augment.js.

Related Issues (14)

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.