The program implements a Brent binary splitting method together with an efficient cache handling hermitian FFT to multiply big integers (NTT with several primes is used for huge computations). To compute p, it is based on the Chudnovsky formula

PiFast also proposes a second method for verification, based on a Ramanujan formula

My experience is that a careful implementation of these techniques seems better than any other approaches (like AGM based formulaes for example) for reachable number of digits.
PiFast implements the computation of E with two formulas, namely

From version 4.0, PiFast permits to compute a large family of user defined constants from linear combination of general hypergeometric series. The algorithm also uses binary splitting, which generalizes well to hypergeometric series.
More information can be found in the PiFast package.