alias vs dot lookup speed
JavaScript performance comparison
Info
http://stackoverflow.com/questions/14178807/is-it-advisable-to-cache-objects-that-are-only-used-twice-in-javascript/14178867#14178867
Preparation code
<script>
Benchmark.prototype.setup = function() {
var app = {
user: {
name: 'Hunter Loftis',
url: 'hunterloftis.com'
}
};
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
alias |
|
pending… |
dot |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments