Sorting an HTML table with JavaScript
To speed up the sorting you first have to find what is consuming time. In your case the slower part of your code is:

for(i = 0; i &lt; rlen; i++){
    rows[i].innerHTML = "&lt;td&gt;"+arr[i].join("&lt;/td&gt;&lt;td&gt;")+"&lt;/td&gt;";
}


The reason is that the DOM elaboration is time consuming for the browser.

Here's an updated version that minimizes the access to the DOM:

function sort_table(tbody, col, asc){
    var rows = tbody.rows, rlen = rows.length, arr = new Array(), i, j, cells, clen;
    // fill the array with values from the table
    for(i = 0; i &lt; rlen; i++){
    cells = rows[i].cells;
    clen = cells.length;
    arr[i] = new Array();
        for(j = 0; j &lt; clen; j++){
        arr[i][j] = cells[j].innerHTML;
        }
    }
    // sort the array by the specified column number (col) and order (asc)
    arr.sort(function(a, b){
        return (a[col] == b[col]) ? 0 : ((a[col] &gt; b[col]) ? asc : -1*asc);
    });
    for(i = 0; i &lt; rlen; i++){
        arr[i] = "&lt;td&gt;"+arr[i].join("&lt;/td&gt;&lt;td&gt;")+"&lt;/td&gt;";
    }
    tbody.innerHTML = "&lt;tr&gt;"+arr.join("&lt;/tr&gt;&lt;tr&gt;")+"&lt;/tr&gt;";
}


Proof: http://jsperf.com/table-sorting-stack-overflow