Similar to Test Run, Compile lets you get programs from your stack/heap at a fixed (lower) price.
The main benefits of Compile over Test Run is that it's a run event, and the program tutor is delayed until you hit encounter ice. This gives you the freedom to make an educated choice on what to pull, and under certain circumstances, it might dissuade the Corp from rezzing any ice at all!
Compile has a bad interaction with Femme, who can't bypass the first piece of ice, since you have to encounter the ice before Compile's tutor activates. For any ice other than the first, she works fine though.
Notable differences to Test Run:
- the tutored program goes on the bottom of the deck, not the top
- the program vanishes at the end of the run, not the end of the turn
You can do some fun things with non-breaker programs like SMC and Grappling Hook. I'm sure there are other candidates for shenanigans in this direction; I can't think of any others at the present time.
Overall, where Test Run is great for banking up and finding stuff you plan on keeping, Compile's flexibility gives you a bit of push power to get into servers you couldn't normally reach. It's best suited for programs that trash themselves or conditional breakers.