"Prefer `xor a` instead of `ld a, 0`" is basically the first optimization that you learn when doing SM83 assembly.
https://github.com/pret/pokecrystal/wiki/Optimizing-assembly...