gecko/js
Nicholas Nethercote b4a9c6b93b Bug 1038601 - Shrink js::HashTable. r=luke.
This patch reduces sizeof(js::HashTable):
- On 64-bit: from 32 bytes to 24 bytes.
- On 32-bit: from 24 bytes to 16 bytes.

The latter is particularly nice because jemalloc rounds up allocation requests
of 24 bytes to 32, but it can allocate 16 bytes without slop, so we're saving
16 bytes per heap-allocated HashTable.

This is done by:
- Shrinking |removedCount| and |hashShift|.
- Reordering the fields.
- Not defining |mutationCount| and |mEntered| in non-DEBUG builds rather than
  using DebugOnly<> -- in non-DEBUG builds, DebugOnly<> fields take up 1 byte
  each.

This change saves over 55 KiB when starting Firefox and loading Gmail.

The patch also uses uint32_t more consistently for the generation.

--HG--
extra : rebase_source : 8bdfbfe40f233711433bd9b7a2b5a19d69beacc7
2014-07-16 16:51:09 -07:00
..
ductwork/debugger Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan 2014-06-24 22:12:07 -07:00
examples Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan 2014-06-24 22:12:07 -07:00
ipc Bug 1034689 part 3 - Fix remaining places in Gecko to handle Latin1 strings. r=bz 2014-07-12 09:43:08 +02:00
public Bug 1038601 - Shrink js::HashTable. r=luke. 2014-07-16 16:51:09 -07:00
src Bug 1038601 - Shrink js::HashTable. r=luke. 2014-07-16 16:51:09 -07:00
xpconnect Bug 1037886 - Report Latin1 and TwoByte strings separately in about:memory. r=njn 2014-07-16 19:11:50 +02:00