Nonviolent Pigeon Manifestation
    Wondering what’s next for npm?Check out our public roadmap! »

    quicksortjs

    0.0.5 • Public • Published

    QuicksortJs

    A quicksort implementation in JavaScript.

    NPM Version NPM Downloads Build Status Test Coverage Code Climate

    • quicksortjs.sort is a functional implementation that chooses the first element as the pivot.

    • quicksortjs.sort2 is an imperative approach that chooses a random pivot.

    Benchmarks

    Firefox (SpiderMonkey):

    quicksortjs.sort:  1406.68ms
    quicksortjs.sort2: 724.75ms
    

    NodeJS (V8):

    $ time cat IntArray.txt | xargs quicksortjs
      
    real    0m2.390s
    user    0m1.037s
    sys	 0m0.087s
    
    $ time cat IntArray.txt | xargs quicksortjs -v2
    
    real    0m2.329s
    user    0m0.727s
    sys	 0m0.077s
    

    Install

    npm i quicksortjs

    DownloadsWeekly Downloads

    3

    Version

    0.0.5

    License

    BSD

    Last publish

    Collaborators

    • avatar