author Steve Snyder <>
Thu, 01 Oct 2009 14:19:41 -0400
changeset 33346 8a43f01f1d6478ad072c1f4a41fb633f8a5e3a32
parent 31683 76581fc3f3eaf037a82a6a49667bcadca6aa4583
child 33465 b8aa319fa2dd989699eab60340bd98fcb160c110
permissions -rw-r--r--
Bug 512865. qcms: Improve SSE2 performance, add SSE support. r=jrmuizel This patch greatly improves the performance of QCMS transformations on x86 & x86_64 systems. Some notes: 0. On 32-bit x86 systems it does runtime selection between non-SIMD, SSE, and SSE2 code paths. 1. On x86_64 systems the SSE2 code path is always taken. The non-SIMD and SSE code paths are left intact, but contemporary versions of the GCC and MSVC compilers will see that they cannot be reached and optimize them away. 2. The execution of the SSE2 code path is reduced by 67%, relative to the original Intel/Microsoft formatted ASM code. The relative performance is seen on a Pentium4 (Northwood) 2.4GHz CPU with DDR1 RAM. 3. The SSE code path provides a 80% reduction in execution time, relative to the non-SIMD code path. The relative performance is seen on a Pentium3 (Coppermine) 1.26GHz CPU with SDRAM. 4. The code has been split out into separate files so that it can be built with different cflags (-msse, and -msse2) when using gcc. 5. Try to land again, this time with __attribute__((__force_align_arg_pointer__)) to avoid crashes on linux.

<?xml version="1.0"?> 

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://global/content/commonDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/commonDialog.css" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://global/locale/commonDialog.dtd">

<dialog id="commonDialog"
        ondialogaccept="return commonDialogOnAccept();"
        ondialogextra1="return commonDialogOnExtra1();"
        ondialogextra2="return commonDialogOnExtra2();"
  <script type="application/javascript" src="chrome://global/content/commonDialog.js"/>
  <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>

  <commandset id="selectEditMenuItems">
    <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')" disabled="true"/>
    <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>

  <popupset id="contentAreaContextSet">
    <popup id="contentAreaContextMenu"
      <menuitem id="context-copy"
      <menuitem id="context-selectall"

  <hbox id="filler" style="min-width: 0%;">
    <spacer style="width: 29em;"/>

      <column flex="1"/>

        <hbox align="start">
          <image id="info.icon" class="spaced"/>
        <vbox id="infoContainer">
#ifdef XP_MACOSX
          <!-- Dialog title is inside dialog for OS X -->
          <description id="info.title" class="dialogTitle"/>
          <description id="info.header" class="header"/>
          <description id="info.body" context="contentAreaContextMenu"/>
      <row id="loginContainer" hidden="true" align="center">
        <label id="loginLabel" value="&editfield0.label;" control="loginTextbox"/>
        <textbox id="loginTextbox"/>
      <row id ="password1Container" hidden="true" align="center">
        <label id="password1Label" value="&editfield1.label;" control="password1Textbox"/>
        <textbox type="password" id="password1Textbox"/>
      <row id="password2Container" hidden="true" align="center">
        <label id="password2Label" value="&editfield2.label;" control="password2Textbox"/>
        <textbox type="password" id="password2Textbox"/>
      <row id="checkboxContainer" hidden="true">
        <checkbox id="checkbox" oncommand="onCheckboxClick(this);"/>

  <!-- This method is called inline because it may unset hidden="true" on the
       above boxes, causing their frames to be build and bindings to load.  
       So, by calling this inline, we guarantee the textboxes and checkboxes 
       above will have their bindings before initButtons is called, and the
       dialog will be intrinsically sized correctly. -->
  <script type="application/javascript">showControls();</script>