Optimizing php, xcache

Has anyone ever tried to optimize (and how) their php code with success?

How do You profile Your scripts?

Has anyone used optimization with a compiled code cache (xCache) and that helped?

Cheers!