diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-02-12 16:23:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-02-12 22:48:19 +0100 |
commit | 4be3e757348fc393cb93dbf8f9fc81ea6d57a408 (patch) | |
tree | 4dd2d305c6ff1d9832bd50b6e08101971530b320 /tests/property_lookup.js | |
parent | 6cd0e478860382d4ab5cf50383a464f0780893b4 (diff) |
Implement a first iteration of the fast property lookup scheme
Fast lookups still require a function call, and will only work
for properties defined on the object itself. Properties of the
prototype will still be slow.
Change-Id: I07c601998d312b1bd8e9977708d3375bf72df3e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/property_lookup.js')
-rw-r--r-- | tests/property_lookup.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/property_lookup.js b/tests/property_lookup.js new file mode 100644 index 0000000000..ee45b65710 --- /dev/null +++ b/tests/property_lookup.js @@ -0,0 +1,9 @@ +function foo() { + var obj = { x: 10 } + + for (var i = 0; i < 1000000; ++i) { + var y = obj.x; + obj.x = y; + } +} +foo(); |