pub fn final_exponentiation_optimized(
    f: &FieldElement<Degree12ExtensionField>,
) -> FieldElement<Degree12ExtensionField> {
    // Easy part:
    // Computes f ^ {(p^6 - 1) * (p^2 + 1)}
    let f_easy_aux = f.conjugate() * f.inv().unwrap();
    let f_easy = &frobenius_square(&f_easy_aux) * f_easy_aux;

    // Optimal Hard Part from the post
    // https://hackmd.io/@Wimet/ry7z1Xj-2#The-Hard-Part
    let mx = cyclotomic_pow_x(&f_easy);
    let mx2 = cyclotomic_pow_x(&mx);
    let mx3 = cyclotomic_pow_x(&mx2);
    let mp = frobenius(&f_easy);
    let mp2 = frobenius_square(&f_easy);
    let mp3 = frobenius_cube(&f_easy);
    let mxp = frobenius(&mx); // (m^x)^p
    let mx2p = frobenius(&mx2); // (m^{x^2})^p
    let mx3p = frobenius(&mx3); // (m^{x^3})^p
    let mx2p2 = frobenius_square(&mx2); // (m^{x^2})^p^2

    let y0 = &mp * &mp2 * &mp3;
    let y1 = f_easy.conjugate();
    let y2 = mx2p2;
    let y3 = mxp.conjugate();
    let y4 = (mx * mx2p).conjugate();
    let y5 = mx2.conjugate();
    let y6 = (mx3 * mx3p).conjugate();

    let t01 = cyclotomic_square(&y6) * y4 * &y5;
    let t11 = &t01 * y3 * y5;
    let t02 = t01 * y2;
    let t12 = cyclotomic_square(&t11) * t02;
    let t13 = cyclotomic_square(&t12);
    let t14 = &t13 * y0;
    let t03 = t13 * y1;
    //let t04 = cyclotomic_square(&t03) * t14;

    cyclotomic_square(&t03) * t14
}
Computes the final exponentiation algorithm optimized
using cyclotomic_pow_x() and cyclotomic_square().
See https://hackmd.io/@Wimet/ry7z1Xj-2#Final-Exponentiation.
crates/math/src/elliptic_curve/short_weierstrass/curves/bn_254/pairing.rs