more optimizations for some break/continue cases

This commit is contained in:
Mihai Bazon
2012-10-18 15:14:57 +03:00
parent 6aa56f92fe
commit afb7faa6fa
5 changed files with 216 additions and 9 deletions

View File

@@ -166,6 +166,12 @@ function string_template(text, props) {
});
};
function remove(array, el) {
for (var i = array.length; --i >= 0;) {
if (array[i] === el) array.splice(i, 1);
}
};
function mergeSort(array, cmp) {
if (array.length < 2) return array.slice();
function merge(a, b) {