Nice job making a cute little bread themed platformer! You got the basics right, I'd like to see how wild you can take the concept of bread as a weapon.
It ran smooth for me, so I'm not sure what optimization you were thinking of beside code cleanup. Pre-optimization is potentially unneeded optimization! Searching for good youtube videos and asking questions in discord can probably help answer your optimization questions.