facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.06k stars 2.99k forks source link

Profile-Guided Optimization (PGO) and BOLT impact on HHVM #9385

Closed zamazan4ik closed 4 months ago

zamazan4ik commented 11 months ago

Hi!

Did you measure the impact of Profile-Guided Optimization (PGO) and/or BOLT (already LLVM BOLT) on HHVM performance (CPU usage/latency/something else)? if yes - could you please share the actual numbers?

I did a quick research on the repo but found only the following mentions about PGO:

For BOLT I didn't find actual numbers but the article says that BOLT was applied to HHVM.

Would be great if you can share the results with the actual numbers. And if any of PGO/BOLT has a measurable impact on HHVM - would be nice to see a note about that in the project documentation (and have an additional build option to build HHVM with PGO/BOLT optimization).

I am interested in this topic since according to my tests PGO in general helps a lot, especially in compiler-like loads.

paulbiss commented 11 months ago

Hi! We see major improvements from both PGO and BOLT. We've published a couple of papers about BOLT that have some of the comparisons you're interested in:

zamazan4ik commented 11 months ago

Thanks for the links! So now I am wondering - did you think about integrating PGO/BOLT into the HHVM build scripts (which are open-source, not Facebook internal build scripts)? Also, would be great to see somewhere in the README or other documentation how HHVM could be optimized with PGO/BOLT and what benefits from the performance perspective could be achieved with that.

lexidor commented 4 months ago

The HHVM team is not going to be able to maintain an external (Cmake) build. I am doubtful they'll change the build to include PGO/Bolt in the external build.

https://hhvm.com/blog/2023/10/27/oss-update.html