float-css-props

Benchmark created on


Preparation HTML

<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.6px;  border: 1.6px solid white; }

</style>
<div id="content">
  <div id="inner">Hello, nurse!</div>
</div>

Setup

var inner = document.getElementById('inner');

Test runner

Ready to run.

Testing in
TestOps/sec
int
inner.className = 'a';
ready
float-rounded
inner.className = 'b';
ready
float-higher
inner.className = 'c';
ready
float-lower
inner.className = 'd';
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.