I recommend attack speed almost unconditionally.
If you have 150 crowns to blow (honestly, who doesn't?) pick up the Cyclops Cap which is sold in the bazaar. It gives a damage bonus low for handguns. Go to the deepest depth you can manage and compare the change in damage. It's usually pretty small.
Now, arguably the attack speed change is also very small (almost imperceptible at times) but there is a reason it still matters more than a damage increase.
For the vast majority of monsters you will face, it will take the same number of shots to kill it, regardless of the damage bonus.
The reason for this is simple. If a mob has 1000 health and you're shooting it for 150 vs 165 with a damage bonus, it still takes 7 shots to kill it either way.
Yes, sometimes the difference will be enough to shave off a single attack. However, on average that will happen based on the % damage increase, which is pretty small (8% for medium give or take for most guns).
With increased attack speed you're actually shooting faster, so every time you'll get those 7 shots out faster and the enemy will die faster.
This makes IAS much more appealing.
The only downside is that its relatively easy to hit the bonus cap for IAS if you use nameless hat/armor. You can only take advantage of a medium IAS UV on a gun. I maintain that this is still preferable to wearing damage armor or chasing damage UVs on guns.