Pipeline Optimization of the Prime Factor Algorithm