Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 May 2004 16:51:56 +0000 (16:51 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 May 2004 16:51:56 +0000 (16:51 +0000)
- two trivial changes for a 1% speedup, thanks to Shark

        * khtml/dom/dom_string.cpp:
        * khtml/dom/dom_string.h:
        (DOM::DOMString::~DOMString): inline this method because it's hot and the
function call overhead was very costly.
        * WebCore.pbproj/project.pbxproj: Add -falign-loops=16
optimization flag, as suggested by Shark.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6555 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/WebCore.pbproj/project.pbxproj
WebCore/khtml/dom/dom_string.cpp
WebCore/khtml/dom/dom_string.h

index 50fa7b7..284c86c 100644 (file)
@@ -1,3 +1,16 @@
+2004-05-06  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       - two trivial changes for a 1% speedup, thanks to Shark
+       
+        * khtml/dom/dom_string.cpp:
+        * khtml/dom/dom_string.h:
+        (DOM::DOMString::~DOMString): inline this method because it's hot and the
+       function call overhead was very costly.
+        * WebCore.pbproj/project.pbxproj: Add -falign-loops=16
+       optimization flag, as suggested by Shark.
+
 2004-05-06  Chris Blumenberg  <cblu@apple.com>
 
        Added alpha to DOMRGBColor as an extension.
index 7871e3f..4dacba8 100644 (file)
                                LIBRARY_SEARCH_PATHS = "";
                                LOCAL_SEG1_ADDR = 0x9000000;
                                MACOSX_DEPLOYMENT_TARGET = 10.2;
-                               OPTIMIZATION_CFLAGS = "-Os";
+                               OPTIMIZATION_CFLAGS = "-Os -falign-loops=16";
                                OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DAPPLE_CHANGES";
                                OTHER_LDFLAGS = "-no-c++filt -umbrella WebKit";
                                PRECOMPILE_PREFIX_HEADER = YES;
index 9b579b5..cc11612 100644 (file)
@@ -82,11 +82,6 @@ DOMString::DOMString(const DOMString &other)
     if(impl) impl->ref();
 }
 
-DOMString::~DOMString()
-{
-    if(impl) impl->deref();
-}
-
 DOMString &DOMString::operator =(const DOMString &other)
 {
     if ( impl != other.impl ) {
index 6eea718..fe68d5a 100644 (file)
@@ -23,6 +23,7 @@
 #define _DOM_DOMString_h_
 
 #include <qstring.h>
+#include <xml/dom_stringimpl.h>
 
 namespace khtml {
     class Length;
@@ -56,7 +57,8 @@ public:
     DOMString(const QString &);
     DOMString(const char *str);
     DOMString(DOMStringImpl *i);
-    ~DOMString();
+    ~DOMString() { if(impl) impl->deref(); }
+
 
     // assign and copy
     DOMString(const DOMString &str);