Implement an expression evaluator which supports only addition and multiplication, The expression can have only digits, plus and multiplication symbols, and optional white-space. Optionally consider optimizing the algorithm for better performance. For example, calculate the result of “5 * 4 + 12”.