There is a great variance in lenses in terms of out of the box sharpness, one Tamron 17-50 may be sharper than the next Tamron 17-50.
It applies to all lenses regardless of manufacturer (even the coveted L series has soft copies, albeit probably not as much due to much more stringent QC during their construction), some people get lucky and get sharp copies from the factory, some have to send it in to get calibrated, some never get a sharp copy.
But in my case, my 17-50 was as sharp as my nifty50 (if not sharper at some fstops); whether or not I got a REALLY sharp 17-50 or a soft nifty50...who is to say (I think they both are
pretty dang sharp).
But primes vs zooms, the primes will usually win.