They are very similar. The processor of the M5 is slightly better and the graphics card of the m3 is slightly better because it is a more modern model. I doubt that there is a difference in practice.
Unless you have to do very lijgeras tasks I can not advise you either. They are very little powerful.