Bug 950716 - IonMonkey: Reorder struct fields for micro-efficiency. r=nbp
authorDan Gohman <sunfish@google.com>
Mon, 16 Dec 2013 11:13:31 -0800
changeset 160667 cf2cf0c496101e26837c1024b8ed4153526c1799
parent 160666 4361abf1909a0ed422a318c186f684c90255fabb
child 160668 77bd9575650b9c3ffa833adb94a925df945acc50
push id37669
push usersunfish@google.com
push dateMon, 16 Dec 2013 19:13:54 +0000
treeherdermozilla-inbound@cf2cf0c49610 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs950716
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950716 - IonMonkey: Reorder struct fields for micro-efficiency. r=nbp
js/src/jit/BitSet.h
js/src/jit/FixedList.h
--- a/js/src/jit/BitSet.h
+++ b/js/src/jit/BitSet.h
@@ -24,21 +24,21 @@ class BitSet : private TempObject
     static const size_t BitsPerWord = 8 * sizeof(uint32_t);
 
     static size_t RawLengthForBits(size_t bits) {
         return (bits + BitsPerWord - 1) / BitsPerWord;
     }
 
   private:
     BitSet(unsigned int numBits) :
-        numBits_(numBits),
-        bits_(nullptr) {}
+        bits_(nullptr),
+        numBits_(numBits) {}
 
-    unsigned int numBits_;
     uint32_t *bits_;
+    const unsigned int numBits_;
 
     static inline uint32_t bitForValue(unsigned int value) {
         return 1l << uint32_t(value % BitsPerWord);
     }
 
     static inline unsigned int wordForValue(unsigned int value) {
         return value / BitsPerWord;
     }
--- a/js/src/jit/FixedList.h
+++ b/js/src/jit/FixedList.h
@@ -14,18 +14,18 @@
 
 namespace js {
 namespace jit {
 
 // List of a fixed length, but the length is unknown until runtime.
 template <typename T>
 class FixedList
 {
+    T *list_;
     size_t length_;
-    T *list_;
 
   private:
     FixedList(const FixedList&); // no copy definition.
     void operator= (const FixedList*); // no assignment definition.
 
   public:
     FixedList()
       : length_(0)