Do hoes mine trees faster than swords do?

Lets say you have a sword and a hoe, can't use your hands and are intending to mine a tree. There is a ton of trees and you can only use one weapon to mine all of them. Which of these would mine the most in the smallest amount of time, a diamond hoe or a diamond sword?


Solution 1:

They both mine at the same speed. It would still be better to use the hoe, because it is used way less than the sword, so you can afford it losing durability or breaking.