As I understand it it works like this:

2 players in a group split the XP from a mob 50/50

4 players in a group split 1.3(?) times the XP from a mob evenly

Thus 4 playes earn more XP overall but it is spread out so they earn less individually per mob

However 4 players WILL nuke a mob faster than 2 players - wether that balances out or not depends on how you play/wether you are questing or grinding/what classes you use/etc and also on how well the two of you co-ordinate together or if you'd have more time to play separately than together

To summarise - just do what feels best as the difference between the two situations is either marginal or dependent on other factors