Mostly you don't want to use the depth buffer though, because you are likely going to be drawing transparent sprites with nice antialised edges. So although you can cheat if you're doing super retro (in which case you're probably wasting your time with this optimisation anyway!) and use something called the alpha test to draw the equivalent of cookie-cutter or "one bit" transparency with the depth buffer successfully, use any translucent sprites and it won't work.
tl;dr - don't use the depth buffer, sort your sprites manually back to front before rendering.
Cas
