Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 373423003: Save 100-300 KB footprint by not force inlining HashTable functions

Created:
6 years, 5 months ago by Daniel Bratell
Modified:
6 years, 2 months ago
Reviewers:
CC:
blink-reviews, blink-reviews-wtf_chromium.org, Mikhail, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Save 100-300 KB footprint by not force inlining HashTable functions As is so easy with templates, HashTable methods, and especially the hash functions that don't depend on the template arguments were duplicated over and over again in the binary. My theory is that the performance win by inlining was offset by the performance hit by larger footprint. It would be interesting to see performance measurements on this. If it's just a few cases where performance is hurt, those could be handled specifically. The gain in a 64 bit Linux content_shell built with gcc 4.8 was: Total change: -259104 bytes =========================== 502 symbols added, totalling +160399 bytes across 60 sources 582 symbols removed, totalling -208174 bytes across 72 sources 1219 symbols grown, for a net change of +201263 bytes (939884 bytes before, 1141147 bytes after) across 361 sources 2098 symbols shrunk, for a net change of -412592 bytes (1862633 bytes before, 1450041 bytes after) across 683 sources The reason symbols grow is that as other functions become smaller, they might suddenly become inlined themselves and the calling function will then grow. BUG=392389

Patch Set 1 #

Patch Set 2 : Non-inlined HashTable: Rebased to newer origin/master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -113 lines) Patch
M Source/wtf/HashCountedSet.h View 5 chunks +5 lines, -5 lines 0 comments Download
M Source/wtf/HashFunctions.h View 1 chunk +5 lines, -54 lines 0 comments Download
M Source/wtf/HashMap.h View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/wtf/HashTable.h View 1 13 chunks +25 lines, -32 lines 0 comments Download
M Source/wtf/HashTable.cpp View 1 1 chunk +77 lines, -0 lines 0 comments Download
M Source/wtf/ListHashSet.h View 1 12 chunks +19 lines, -19 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698