You kinda just have to learn the weapons and make judgement calls. The base item always has the same stats, so the answer to "is this weapon better than my identical current one discounting mods," is no, they're the same.
Mods are the only thing that change weapons, and you can take them off one and put them back on another of the same type, so if you have a tricked out 10mm pistol, and get a legendary one, you can take the mods of the tricked out one (by replacing them with standard "mods") and sticking them onto the legendary.
A non exhaustive list of ballistic weapons includes:
10mm pistol (semi or auto, depends on the reciever mod)
Pipe pistol (semi or auto)
Revolver pipe pistol
Pipe pistol/rifle (semi or auto)
Double barreled shotgun
Hunting rifle (which becomes a Sniper Rifle with mods)
Sub machine gun
So if you see a Hardened Auto Marksman Pipe pistol and a Calibrated Tactical pipe pistol, they're both pipe weapons, and therefore the same. You can pull the mods off and rearrange them however you wish.
Note that the pipe weapons can share most mods, and the difference between a rifle and a pistol is the stock/grip mod attached.
I also cannot reiterate enough that Sniper Rifles are Hunting Rifles with mods. There is even a .50 reciever for the Hunting Rifle, and a muzzle break, and with enough mods that piddly .308 pop gun looks suspiciously like an AMR from New Vegas.