If all the enemies stacked up in one spot and there's no target cap, pure barbarian all the waaaay if it's just melee we're talking about. Honestly, best really depends on specific criteria. A mage like a druid or wizard is going to run out of resources eventually in a nonstop marathon battle so melee builds will pull out ahead in that context or if their nukes are against stupid high resistances.
Are there battles that are so long where casters run out of spells? I thought casters no longer need to sleep after every fight?
When I meant marathon I meant a single long fight that would exhaust your spells. Though the point is only valid up to a certain level in a party where the whole resource limitation can be sidestepped.