float-css-props
JavaScript performance comparison
Preparation code
<style>
#content { border: 1px solid red; }
#inner { background: #888; }
.a { width: 100px; border: 2px solid white; }
.b { width: 100.0px; border: 2.0px solid white; }
.c { width: 100.4px; border: 2.4px solid white; }
.d { width: 99.684897398737379px; border: 1.6px solid white; }
</style>
<div id="content">
<div id="inner">Hello, nurse!</div>
</div>
<script>
Benchmark.prototype.setup = function() {
var inner = document.getElementById('inner');
};
</script>
Preparation code output
Hello, nurse!
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
int |
|
pending… |
float-rounded |
|
pending… |
float-higher |
|
pending… |
float-lower |
|
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
- Revision 2: published
0 comments