html5shiv-createelement
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
document._createElement = document.createElement;
document._createDocumentFragment = document.createDocumentFragment;
</script>
<script src="https://raw.github.com/aFarkas/html5shiv/3.3/src/html5shiv-printshiv.js"></script>
<script>
(function() {
document._createElement33 = document.createElement;
document.createElement = document._createElement;
document.createDocumentFragment = document._createDocumentFragment;
var sheet = document.getElementsByTagName('style')[0];
sheet && sheet.parentNode.removeChild(sheet);
html5 = document.documentShived = null;
}());
</script>
<script src="https://raw.github.com/aFarkas/html5shiv/124a2cd3359ab9740fce8236d174937a75ef41be/src/html5shiv-printshiv.js"></script>
<script>
document._createElement34 = document.createElement;
document.createElement = document._createElement;
document.createDocumentFragment = document._createDocumentFragment;
html5 = document.documentShived = null;
// hide run button for browsers not shived
if ($.support.html5Clone) {
$('#run').hide();
ui.run = $.noop;
}
</script>
<script>
Benchmark.prototype.setup = function() {
var $ = jQuery,
doc = document;
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
shived 3.3 |
|
pending… |
shived 3.4 |
|
pending… |
normal |
|
pending… |
jQuery |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by John-David Dalton and last updated
- Revision 2: published
- Revision 3: published
- Revision 4: published
- Revision 5: published
0 comments