At first sight I think you could improve performance not resizing the pictures in draw(). Resize just after loading the image, thus you can save precious resources and you´ll avoid trying to re-resize an already resized picture...
bla,bla {
mario[m] = loadImage("mario000"+m+".jpeg");
mario[m].resize(imageWidth,imageHeight)
}
Marginally, I think I wouldn´t call to width/2 and height/2 at any frame, load them both in variables (that´s not much important in this case, though)... Finally (and maybe most important), the fastest way to display a picture in screen is not background()... I think you should go into pixel arrays, that probably would be the simplest fast way of doing that (set() would be also better than background(), I think). You can try this also, although maybe it´s advanced stuff (and more interesting, for sure):
https://forum.processing.org/topic/snippet-crazy-fast-image-loading
Good luck! :-)
Ale · 60rpm.tv/i