OPcache compiles PHP scripts into bytecode and caches it in shared memory, avoiding the cost of re-parsing and re-compiling source files on every request; it's essential for production performance. Preloading (opcache.preload, PHP 7.4+) can load classes/functions into memory once at server startup for even faster subsequent requests.
Profiling tools like Xdebug or Blackfire help locate real bottlenecks (often database queries or N+1 patterns) rather than guessing, since PHP itself is rarely the slowest part of a typical web request.