text to one div or to few
JavaScript performance comparison
Preparation code
<div id="console_input" class="consoleInput">
<div id="main_console">
</div>
<div id="drag_hint">
Dragging
<span id="vec_or_line">
</span>
from (
<span id="dr_x_from">
</span>
,
<span id="dr_y_from">
</span>
) to (
<span id="dr_x_to">
</span>
,
<span id="dr_y_to">
</span>
)
</div>
</div>
<script>
Benchmark.prototype.setup = function() {
function ConsoleController() {
this.mainConsoleDiv = document.getElementById('main_console');
this.draggingDiv = document.getElementById('drag_hint');
this.draggingVecOrLineDiv = document.getElementById('vec_or_line');
this.draggingFromX = document.getElementById('dr_x_from');
this.draggingFromY = document.getElementById('dr_y_from');
this.draggingToX = document.getElementById('dr_x_to');
this.draggingToY = document.getElementById('dr_y_to');
}
var textArea = new ConsoleController();
};
</script>
Preparation code output
Dragging
from (
,
) to (
,
)
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Text to one div |
|
pending… |
Text to few divs |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments