Without more information, both are roughly equivilant (in that if you continue to spam the attack button, they will both do the exact same amount of damage over time).
However, do keep in mind whether the secondary effect is Expose, or Exploit, and whether it's a Single Target or AoE effect (Cone, Cylindrical, or Targeted). Depending on your tactics and the set up of the rest of your group, this can be more important then the standard DPS of the weapon, as well as the range of it (and it's secondary effect).
But... that's all up to you and your preferences. Nobody can really tell you what is 'best', as that varies a lot. The most 'optimal' situation (the situation that produces the most damage in the least amount of time under ideal conditions) will have other factors then just the weapon damage into it (the skills of your Bridge Officers, your personal career track, what Kit you have out, and who you're fighting against [because what they can block with matters], and what kind of cover you can expect yourself and your enemy to make use of [believe it or not, they do use cover sometimes]).
...Probably not a helpful answer, but you don't exactly have a lot of info for me to work off of to hypothesize with (other then that the second weapon has a shorter firing period and cooldown then the first).