facebookarchive / BOLT

Binary Optimization and Layout Tool - A linux command-line utility used for optimizing performance of binaries
2.51k stars 177 forks source link

Promote BOLT to the chromium team #302

Closed LifeIsStrange closed 1 year ago

LifeIsStrange commented 2 years ago

I'm pretty sure them not using it is a huge missed opportunity for end users performance (billions of humans) (and related projects such as Skia, ANGLE, freetype, etc)

That would be quite a meaningful utilitaristic goal.

insilications commented 2 years ago

Indeed, at such large scales the gains are huge.

aaupov commented 2 years ago

I'm pretty sure them not using it is a huge missed opportunity for end users performance (billions of humans) (and related projects such as Skia, ANGLE, freetype, etc)

That would be quite a meaningful utilitaristic goal.

I don't recall seeing an interest from chromium devs. Do you have any contacts? Feel free to ping them here.

corona10 commented 1 year ago

@aaupov

FYI, CPython now adopt llvm-bolt as an experimental feature: https://github.com/python/cpython/commit/214eb2cce5caa99f476ae8abd406077e2c293a3c

I am expecting the usage through ./configure --enable-optimizations --with-lto --enable-bolt

LifeIsStrange commented 1 year ago

Friendly ping @nfischer Since chromium use LTO and PGO, leveraging BOLT would be the next logical step for improving end users performance of the web

nfischer commented 1 year ago

It looks like folks on the Chromium build team are already thinking about this! :smile: I suggest you click the "star" icon for https://crbug.com/1163978 if you would like to be notified of further updates.

aaupov commented 1 year ago

Quick update: I tried to apply BOLT to Chromium but currently blocked by https://github.com/llvm/llvm-project/issues/59794

aaupov commented 1 year ago

Update:

aaupov commented 1 year ago

On the first glance CFI enabled by Chromium on Linux/x86 in official build mode is non-trivial to support in BOLT. I'll try to run BOLT on just Release+PGO build to decide if further effort is worthwhile.

aaupov commented 1 year ago

I've made a post summarizing my findings: https://aaupov.github.io/blog/2022/11/12/bolt-chromium

In short, BOLT appears to be reasonably effective for Chromium, with Speedometer results comparable to that of PGO build (https://blog.chromium.org/2020/08/chrome-just-got-faster-with-profile.html): 7.7% speedup from PGO (Mac), ~6% speedup from BOLT (Linux) on top of PGO.

To note, BOLT profile definitely wasn't of the highest quality, so the performance can potentially be further improved.

LifeIsStrange commented 1 year ago

@aaupov this is huge!! I hope it will end up being enabled by default for public releases :)

aaupov commented 1 year ago

https://bugs.chromium.org/p/chromium/issues/detail?id=1163978#c15