Facebook actually does some compile-time optimizations, but also ships some of the profiling data for JITing between early deploy phases and the rest of the fleet:
https://engineering.fb.com/2021/03/03/developer-tools/hhvm-j...Also, Facebook used to do ahead of time compilation (HPHPc) but eventually HHVM managed to outperform it.