GlyphPage wastes a lot of space with padding, because it has a 256-size array of GlyphData, which is { unsigned short, pointer }. In 64-bit, that's 6 bytes of padding.
<rdar://problem/6864062>
Created attachment 30086 [details] Patch, changelog
Comment on attachment 30086 [details] Patch, changelog How did you test the performance impact of this change?
I'm going to run PLTs today.
PLTs show this is a small perf gain (0.25%).
Comment on attachment 30086 [details] Patch, changelog > + GlyphData() > + : glyph(0) > + , fontData(0) > + { > + } > + GlyphData(Glyph g, const SimpleFontData* f) > + : glyph(g) > + , fontData(f) > + { > + } Could just write the above as one constructor with default arguments: GlyphData(Glyph g = 0, const SimpleFontData* f = 0) instead. > + memcpy(m_glyphs, other.m_glyphs, GlyphPage::size * sizeof(m_glyphs[0])); > + memcpy(m_glyphFontData, other.m_glyphFontData, GlyphPage::size * sizeof(m_glyphFontData[0])); This is in a member of GlyphPage, so you can omit the GlyphPage:: from the use of size. In fact, you should just use sizeof(m_glyphs) and sizeof(m_glyphFontData). > + memset(m_glyphs, 0, GlyphPage::size * sizeof(m_glyphs[0])); > + memset(m_glyphFontData, 0, GlyphPage::size * sizeof(m_glyphFontData[0])); Ditto. r=me
http://trac.webkit.org/changeset/43364