TY - GEN
T1 - To unify or not to unify
T2 - 28th International Conference on Compiler Construction, CC 2019
AU - Kubota, Takafumi
AU - Suzuki, Yusuke
AU - Kono, Kenji
N1 - Publisher Copyright:
© 2019 Association for Computing Machinery.
PY - 2019/2/16
Y1 - 2019/2/16
N2 - Unified builds are a simple but effective technique to reduce the build time of large software projects. Unified builds generate large compiler tasks by bundling multiple source files into one, resulting in a significant reduction in build time through removal of redundant work incurred by shared headers. However, unified builds have a negative effect on incremental builds because each compiler task gets larger. An ad-hoc unification strategy causes an excessive slowdown in incremental builds. A rough report from WebKit says the worst slowdown is 20% (6s → 7s), but our investigation shows it is as high as 479% (19s → 110s). In this paper, we investigate the characteristics of unified builds to find a sweet spot, which generates compiler tasks that reduce the full build time without increasing the incremental build time. An in-depth analysis of WebKit reveals 1) source files with higher header similarity should be unified, 2) source files that have significant differences in compile times should not be unified, and 3) source files that are not frontend-intensive should not be unified. Our case study shows the total build time is reduced by 2.66%, and the worst slowdown falls from 479% to 129%. These findings will be of help in deriving a more intelligent strategy of unification and give a basis for discussions on future build systems, compilers, and module systems that cooperatively generate efficient compiler tasks.
AB - Unified builds are a simple but effective technique to reduce the build time of large software projects. Unified builds generate large compiler tasks by bundling multiple source files into one, resulting in a significant reduction in build time through removal of redundant work incurred by shared headers. However, unified builds have a negative effect on incremental builds because each compiler task gets larger. An ad-hoc unification strategy causes an excessive slowdown in incremental builds. A rough report from WebKit says the worst slowdown is 20% (6s → 7s), but our investigation shows it is as high as 479% (19s → 110s). In this paper, we investigate the characteristics of unified builds to find a sweet spot, which generates compiler tasks that reduce the full build time without increasing the incremental build time. An in-depth analysis of WebKit reveals 1) source files with higher header similarity should be unified, 2) source files that have significant differences in compile times should not be unified, and 3) source files that are not frontend-intensive should not be unified. Our case study shows the total build time is reduced by 2.66%, and the worst slowdown falls from 479% to 129%. These findings will be of help in deriving a more intelligent strategy of unification and give a basis for discussions on future build systems, compilers, and module systems that cooperatively generate efficient compiler tasks.
KW - Build system
KW - Compile time analysis
KW - Incremental builds
KW - Source code characterization
KW - Unified builds
UR - http://www.scopus.com/inward/record.url?scp=85062260387&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85062260387&partnerID=8YFLogxK
U2 - 10.1145/3302516.3307347
DO - 10.1145/3302516.3307347
M3 - Conference contribution
AN - SCOPUS:85062260387
T3 - ACM International Conference Proceeding Series
SP - 42
EP - 52
BT - CC 2019 - Proceedings of the 28th International Conference on Compiler Construction
A2 - Amaral, J. Nelson
A2 - Kulkarni, Milind
PB - Association for Computing Machinery
Y2 - 16 February 2019 through 17 February 2019
ER -