[Webkit-unassigned] [Bug 111949] Not for landing, bot test only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 21 21:44:25 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=111949





--- Comment #24 from Kassy Coan <kassycoan at gmail.com>  2013-03-21 21:46:51 PST ---
I ran profiling for both methods (count is the number of properties at that histogram flush):

Elapsed Time MAP: 0.000120 count: 105
Elapsed Time SWITCH: 0.000080 count: 105

Elapsed Time MAP: 0.000001 count: 0
Elapsed Time SWITCH: 0.000000 count: 0

Elapsed Time MAP: 0.000039 count: 103
Elapsed Time SWITCH: 0.000031 count: 103

Elapsed Time MAP: 0.000035 count: 95
Elapsed Time SWITCH: 0.000029 count: 95

Elapsed Time MAP: 0.000035 count: 95
Elapsed Time SWITCH: 0.000031 count: 95

Elapsed Time MAP: 0.000035 count: 94
Elapsed Time SWITCH: 0.000028 count: 94

I had gone with the map because I thought it would be faster, and it seemed like good practice. However, it looks like the switch is consistently marginally faster.

I'm uploading the switch implementation for bot testing now.
(The previous implementation was passing on the local mac machines, so I expect this to have no trouble).

This switch implementation assigns the constants directly, without use of the enumeration. I did this for 2 reasons.
1. The code reads clearly without use of the enum
2. It makes updating/adding in new properties easier with fewer steps.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list