UTCParser drawback
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
function dateFromUTC(localTime) {
var dateTimeComponents = localTime.split(" ");
var dateComponent = dateTimeComponents[0].split("-");
var timeComponent = dateTimeComponents[1].split(":");
return new Date(parseInt(dateComponent[0]), parseInt(dateComponent[1]) - 1, parseInt(dateComponent[2]), parseInt(timeComponent[0]), parseInt(timeComponent[1]), parseInt(timeComponent[2]));
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Base |
|
pending… |
Parser |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments