Underscore Sort/Unique order
JavaScript performance comparison
Preparation code
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js">
</script>
<script>
Benchmark.prototype.setup = function() {
var values = []
for (var i = 0; i < 100000; i++) {
values.push(Math.random().toString(36).substring(2));
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
uniq, sort |
|
pending… |
sort, uniq |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published
- Revision 2: published
0 comments