Need private packages and team management tools?Check out npm Teams »

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

1

Version

0.0.5

License

BSD

Last publish

Collaborators

  • avatar