Skip to content

Commit

Permalink
Removed use of predefined array size for performance on big tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Cray committed Oct 3, 2013
1 parent 25dde71 commit deb56bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions taboosorter.js
Expand Up @@ -52,8 +52,8 @@
return a > b ? 1 : a < b ? -1 : 0;
},
number: function (a, b) {
a = a * 1;
b = b * 1;
a = +a;
b = +b;
a = a != a ? inf : a;
b = b != b ? inf : b;

Expand Down Expand Up @@ -136,8 +136,8 @@
table_body2 = table_body.cloneNode(false),
table_rows = table_body.rows,
table_row_count = table_rows.length,
table_rows2 = new Array(table_row_count),
sorting_index = new Array(table_row_count),
table_rows2 = [],
sorting_index = [],
table_headers = $(el.getElementsByTagName('thead')[0].rows[0].cells),
table_header_count = table_headers.length,
header_class,
Expand Down

0 comments on commit deb56bf

Please sign in to comment.