undefined sort

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var foo = ['asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'afdsgawtwer', 'afioietw5235', 'adsfsasfd', 'gjfsjtvf', 'j45fmvsd', 'virewj4ri23fsdvaw', 'asdfnaeit4ttr', 'ijöofqe 23r 2qfd', 'mi32fna993 f', '123123123qwe', '12312543543', 'adfmoi4wagreavae', 'äpeve4farviea4f', 'gafefrevineafr', 'cafm43jvr', 'koqk2e21f32v4', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'afdsgawtwer', 'afioietw5235', 'adsfsasfd', 'gjfsjtvf', 'j45fmvsd', 'virewj4ri23fsdvaw', 'asdfnaeit4ttr', 'ijöofqe 23r 2qfd', 'mi32fna993 f', '123123123qwe', '12312543543', 'adfmoi4wagreavae', 'äpeve4farviea4f', 'gafefrevineafr', 'cafm43jvr', 'koqk2e21f32v4', 'asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'afdsgawtwer', 'afioietw5235', 'adsfsasfd', 'gjfsjtvf', 'j45fmvsd', 'virewj4ri23fsdvaw', 'asdfnaeit4ttr', 'ijöofqe 23r 2qfd', 'mi32fna993 f', '123123123qwe', '12312543543', 'adfmoi4wagreavae', 'äpeve4farviea4f', 'gafefrevineafr', 'cafm43jvr', 'koqk2e21f32v4', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'asdf', 'moep', 'blubber', 'whatup', 'wat', 'fuuu', 'ffuuuuuu', 'this is shit', 'how the fuck are you mate?', 'blahblah', 'trölölölölölöööö', 'asdf', 'assdd', 'hafsdgsd', 'asdafdsgdsgdsg aasd gfasdfsfd dsafdsa', 'sdfsafd', 'asdfasdfdsafdsa', 'sadgsagdsagf sadf sadf dsaf', 'dsafdsafjsaifewa', 'sadfdsafaersgds', 'hdfhsersafasdvgas', 'sdajtjoiadfs', 'iodanmsdfasefeas', 'slkdfjejawemvasdvdsa', 'dsafaviasjfefa je fjasdfsa', 'sadfds', 'adsf iewfwe', 'davioejvasd', ' dsaf sad fads fa', '_', '?', 'ewfa3', '12', 'asdgas gsdg sadgae', 'jjhdsae', 'qweasdas', '2131', '$äööü', 'safsaf', 'zaa', 'a', 'afdsgawtwer', 'afioietw5235', 'adsfsasfd', 'gjfsjtvf', 'j45fmvsd', 'virewj4ri23fsdvaw', 'asdfnaeit4ttr', 'ijöofqe 23r 2qfd', 'mi32fna993 f', '123123123qwe', '12312543543', 'adfmoi4wagreavae', 'äpeve4farviea4f', 'gafefrevineafr', 'cafm43jvr', 'koqk2e21f32v4']
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Return 0
foo.sort(function(a, b) {
  if (a < b) return -1
  if (a > b) return  1

  return 0
})
pending…
Return void
foo.sort(function(a, b) {
  if (a < b) return -1
  if (a > b) return  1
})
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment