The main point to be made here is that planning for optimisation is good - but don't worry too much about speed issues until you have a working piece of software. Then you can apply some profiling technique and figure out what parts of code you should try and optimise. I've worked on commercial 3d engines for big games companies and it's pretty much always the last thing I'd do. For a new programmer (if indeed you are) the main skill for you to develop is to structure and modularise your code well.