test return
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var direct = function (value) {
if (!value || value.length == 0 || value == null) {
return false
}
return true
};
var state_t = function (value) {
if (!value || value.length == 0 || value == null) {
return false
} else {
return true
}
};
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
dir |
|
pending… |
state |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments