Bug 19116 - SquirrelFish shouldn't regress on variable lookups
Summary: SquirrelFish shouldn't regress on variable lookups
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://flesler.webs.com/Benchmark/vars/
Keywords:
: 18645 18823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-18 15:50 PDT by Anthony Ricaud
Modified: 2008-05-25 22:01 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2008-05-18 15:50:45 PDT
Nightlies have great performance improvements compared to Safari 3.1. SquirellFish shouldn't regress on that point. It's a test to compare lookups performance with variables in different scopes

For the record, here are the results I have on my machine :
FF3ß5
global : average : 44ms
local1 : average : 57.6ms
local2 : average : 55.8ms
local3 : average : 36.4ms

Opera 9.27
global : average : 79ms
local1 : average : 78.4ms
local2 : average : 79.2ms
local3 : average : 74.8ms

Opera 9.5
global : average : 51.4ms
local1 : average : 26.8ms
local2 : average : 35.6ms
local3 : average : 24ms

Safari 3.1
global : average : 90.8ms
local1 : average : 54.8ms
local2 : average : 44.8ms
local3 : average : 34.4ms

Webkit r33561
global : average : 17.8ms
local1 : average : 17.4ms
local2 : average : 16.4ms
local3 : average : 16ms
Comment 1 Anthony Ricaud 2008-05-18 16:06:07 PDT
The original blog post of the author for more information : http://flesler.blogspot.com/2008/04/benchmarking-javascript-variables-and.html
Comment 2 Mark Rowe (bdash) 2008-05-19 03:57:49 PDT
Are there measurements that suggest SquirrelFish is a regression over trunk on this microbenchmark?
Comment 3 Oliver Hunt 2008-05-19 04:01:54 PDT
Mark, this is basically the tracking bug for the multiscope optimisation, squirrelfish performance is currently effectively a faster version of S3.1 -- basically resolve time for an out of scope var is O(N) wrt to closure depth, vs. effectively O(1) on trunk
Comment 4 Oliver Hunt 2008-05-19 04:02:12 PDT
(I'm actually working on this atm)
Comment 5 Oliver Hunt 2008-05-21 01:50:32 PDT
resolve is corrected
Committing to http://svn.webkit.org/repository/webkit/branches/squirrelfish ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/VM/CodeBlock.cpp
	M	JavaScriptCore/VM/CodeBlock.h
	M	JavaScriptCore/VM/CodeGenerator.cpp
	M	JavaScriptCore/VM/CodeGenerator.h
	M	JavaScriptCore/VM/Machine.cpp
	M	JavaScriptCore/VM/Opcode.h
	M	JavaScriptCore/kjs/JSVariableObject.h
Committed r33958

Looks to be twice as fast as in trunk, still have base resolution to go
Comment 6 Anthony Ricaud 2008-05-21 11:00:17 PDT
Squirellfish branch r33967:

global : average : 9.6ms
local1 : average : 8.8ms
local2 : average : 8.4ms
local3 : average : 8ms

I think it's not regressing :)
Comment 7 Oliver Hunt 2008-05-22 12:38:02 PDT
Last fix (for read/write/modify operations) 
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/kjs/nodes.cpp
Committed r34030

Comment 8 Oliver Hunt 2008-05-25 22:01:19 PDT
*** Bug 18645 has been marked as a duplicate of this bug. ***
Comment 9 Oliver Hunt 2008-05-25 22:01:32 PDT
*** Bug 18823 has been marked as a duplicate of this bug. ***