<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>11576</bug_id>
          
          <creation_ts>2006-11-11 21:32:07 -0800</creation_ts>
          <short_desc>.25% performance regression on JS iBench due to JSImmediate changes</short_desc>
          <delta_ts>2007-07-13 21:40:33 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dgibson77</cc>
    
    <cc>mjs</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45972</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-11-11 21:32:07 -0800</bug_when>
    <thetext>Platform compatibility changes to JSImmediate.h between r17372 and r17740 caused a .25% performance regression on JS iBench. I ran the test twice.

I suspect either that something is no longer being inlined, or that something that used to be a compile-time constant is now a run-time lookup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45987</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-11-12 01:46:49 -0800</bug_when>
    <thetext>Is this on Intel or PowerPC? I have checked PowerPC disassembly, and JSImmediate is still fully inlined (the intermediate helpers are simply not present in the object code:

otool -tvV JavaScriptCore | grep JSImmediate | c++filt

I have also checked several call spots to verify that the constants haven&apos;t magically moved to data segment or anything.

&gt; changes to JSImmediate.h between r17372 and r17740

Does reverting this single file to r17372 fix the regression?

I have tried reverting this file and comparing full JavaScriptCore disassemblies, but that proved difficult - gcc has slightly moved a lot of code and data for whatever reason. However, I did spend some time comparing them, and found no smoking gun.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45923</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-11-12 16:15:06 -0800</bug_when>
    <thetext>Intel. MacBook Pro. 

Yes, reverting just JSImmediate.h fixes the regression. That&apos;s how I ran the test.

.25% is a small change, but it&apos;s slightly greater than JS iBench&apos;s margin of error (which is about .15%-.20%).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45914</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-11-12 22:08:16 -0800</bug_when>
    <thetext>Hmm, Intel disassembly also looks OK...

The biggest change I see is that many large switches (such as those in callAsFunction methods) now have their cases ordered differently, for no apparent reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31254</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-28 19:01:41 -0800</bug_when>
    <thetext>&lt;rdar://problem/4960249&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4841</commentid>
    <comment_count>5</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-07-13 21:40:17 -0700</bug_when>
    <thetext>Closed in radar</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>