Fast Enterprises interview question

Write the implementation for a prime factorization algorithm. What ways could you make this algorithm more efficient?