Well I would say that based on this link, performance at f/4 is similar for both as far as sharpness goes. Distortion can be compared at this link.
I'm not sure what you mean by blur, if you are talking about bokeh, neither of these are going to be great. You really need a prime, and even for that a lens this wide isn't going to produce much out of focus.
Really you are comparing apples to oranges here. A better comparison is the Tamron against the Canon 17-55mm f/2.8 IS USM. The Canon 17-40 is full frame compatible, f/4, without stabilization(same as Tamron), and a Canon L lens that comes with its associated durability(construction, sealing, etc).
So do you want/need image stabilization? Do you want/need f/2.8? You need to make these decisions as well as a price to determine what is best for you.