Git Product home page Git Product logo

Comments (11)

inspirit avatar inspirit commented on June 17, 2024

there was one in the past:
http://jsperf.com/sort-v8-copied/18

the idea behind is to make it generous as much as possible so u can sort anything and within any specified range

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

That's awesome. Do you know who the author of the algorithm is or is it just one of those general optimization techniques people try?

I've done some experiments with Introsort which is a quick sort + heap sort hybrid, but that did not have as good results.

Just wondering if the author would be offended if I plagiarized it..

from jsfeat.

inspirit avatar inspirit commented on June 17, 2024

if u look in source u will find the comment:

// The current implementation was derived from *BSD system qsort():
// Copyright (c) 1992, 1993
// The Regents of the University of California. All rights reserved.

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

Ah, thanks. Not sure how I missed that. Should have rtfm

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

One more thing. Did you do the port from BSD's qsort? If not, where did the JS implementation come from?

from jsfeat.

inspirit avatar inspirit commented on June 17, 2024

i ported it from C source code. there is no over JS versions. at least i dont know any.

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

Ah, I didn't know. Nice job!

The reason I'm so interested in it is that I need something similar for a project of mine.

It would be helpful if you would publish it as a stand alone module on npm. I'd be happy to do so and give you full credit and/or add you as a maintainer if that would be easier.

from jsfeat.

inspirit avatar inspirit commented on June 17, 2024

well u can do it yourself i guess.

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

Thanks. Will do.

from jsfeat.

arnorhs avatar arnorhs commented on June 17, 2024

I published the module here: https://npmjs.org/package/qsort

I tried to give credit where I could and you are listed as the author in the package.json as well.

Thanks. Definitely faster on top of being able to sort partial sets. Awesome work.

from jsfeat.

inspirit avatar inspirit commented on June 17, 2024

nice! thanx for the info :)

from jsfeat.

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.