At 1st level, Even. After 1st level, Warlock
Your question seems to distill down to who has the better cantrips as once a caster's out of spell slots that's their next line of offense. For a warlock, this is often their prime form of offense, but for wizards (especially those beyond 1st) cantrips are preferably a last form of offense.
On the sole basis of being 'out of spells slots', a Warlock will consistently be more useful in combat from a DPS perspective and possibly a battlefield control perspective (depending on what invocations are chosen). This statement does have the caveat that the warlock has chosen at least some invocations to enhance that ability.
Wizards relying solely upon cantrips can deal, at most, 1d10 fire damage with the Fire Bolt cantrip. However, there's a few issues with relying upon that as a the sole means to deal damage:
- Fire damage is very often resisted;
- One attack roll, meaning it's all or nothing and it's only against one target
- Unless an evocation wizard, there's no addition of their modifier to the damage rolls.
Conversely, Warlocks get the ever reliable Eldritch Blast cantrip. At 1st level, the two classes are dealing the same 1d10 damage, but after 1st level, Warlocks get the benefit of various invocations, which can be used to increase Eldritch Blast's damage output, push/pull enemies around, etc. Furthermore:
- Eldritch blast uses force damage. It works on just about everything, there are very few things resistant to force and even fewer that are immune.
- There's at least a half dozen invocations a Warlock could take to enhance its effectiveness in various ways and taking just 1 or 2 puts the Warlock far ahead of the Wizard in the straight cantrip game.
- After 5th level, the number of bolts increases. Multiple attack rolls means multiple chances to hit, multiple chances to crit, and multiple chances to hit more than 1 target.