Hi I'm looking more for confirmation than advice.

I've recently been having difficulties with a tft touch displsy (not the pjrc one but identical - it costs way too much to ship pjrc ones to the uk).
just recently the TFT display has been corrupted after a few minutes running, colours going wrong, bits missing, lines across the screen.
I've been racking my brains for a few days trying to figure out why, then I think i figured it out.
after having to reinstall arduino and teensyduino, I could not remember what setting I had been on previously so set Arduino to teensy 3.5 & optimisation fastest + pure code.
I've just changed that to optimisation fast, and the display has been running fine for the last few hours with no glitches.

Am I right in thinking it was the optimisation settings that caused the problem?
or am i barking up the wrong tree?