Cornell box - path tracer

I am studying the code of the basic path tracer you provide. On my machine (a weak gt540m) it runs at about 2 FPS. My question is: is it because the code is not optimized?
Other than turning the code into a bidirectinoal path tracer with MLT, which would increase the convergency speed, what optimizations can be done to make the simulator run at a higher frame rate even with a very noisy image?
Also, if I convert the code to use Prime, would that improve the performance?