Skip to content

Instantly share code, notes, and snippets.

@2no
Created June 30, 2011 04:07
Show Gist options
  • Save 2no/1055617 to your computer and use it in GitHub Desktop.
Save 2no/1055617 to your computer and use it in GitHub Desktop.
V8 エンジンは内部的にクイックソートを使用している為、安定していない。
var hoge = [8, 3, 7, 5, 4, 11, 9, 10, 6, 1, 2];
hoge.sort(function() {return 0;});
// RESULT
// Google Chrome 12.0.742.112
// node v0.4.8
// [11, 8, 7, 5, 4, 3, 9, 10, 6, 1, 2]
// ActionScript 3 + Flash Player 10,2,159,1
// [11, 3, 7, 5, 4, 8, 9, 10, 6, 1, 2]
// etc
// IE8/9
// Firefox 3.6.18
// Safari 5.0.5
// Opera 11.11
// ActionScript 2 + Flash Player 10,2,159,1
// [8, 3, 7, 5, 4, 11, 9, 10, 6, 1, 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment