1.0.16 • Published 2 years ago

introsort v1.0.16

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

Introsort implemented in Javascript

Javascript implementation of Introsort.

There are probably not many real-world use cases for it judging by this JSperf benchmark, but I was Googling and couldn't find a Javascript version of this algorithm.

I found this Java version and ported it over to Javascript

Install using npm:

npm install introsort

Usage:

var introsort = require('introsort');

var array = [5,3,9,292];
introsort(array);

Todo:

  • I noticed that it does not sort correctly if the array contains zeros. Probably something wrong in my port (at least trailing zeros)
  • The whole thing can probably be optimized a lot for Javascript. The straight up Java port is probably not the fastest way to go

License

MIT

1.0.16

2 years ago

1.0.15

2 years ago

1.0.11

2 years ago

1.0.13

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

0.0.2

10 years ago

0.0.1

11 years ago