1. A computer-implemented method, comprising: solving on a computing system an optimal power flow formulation for a plurality of generators in a power system, wherein the solving comprises: computing using multi-threaded parallelism a plurality of constraints for the formulation; computing using multi-threaded parallelism a plurality of Jacobian functions of the constraints, the computing using multi-threaded parallelism the plurality of Jacobian functions of the constraints further comprising storing certain values computed when computing the plurality of constraints for the formulation and comprising using the certain values of when computing the plurality of Jacobian functions, wherein the certain values comprise values for a conjugate current vector i*, S ij , which is power on a transmission line from a node i to a node j, and v i v j *y ij *, where v i is a voltage at node i, v j * is a conjugate of a voltage at node j, and y ij * is a conjugate of an admittance from node i to a node j; and computing using multi-threaded parallelism a Hessian of Lagrangian functions; and outputting results of the solving, wherein the results comprise values of generation levels for the plurality of generators.