Gnashor's Tooth is primarily an AP item that gives attack speed as well. Typically, if you're building this, it is for some attack speed, but you aren't looking to cap attack speed. If this weren't the case, you'd follow up with more attack speed items and the bonus AP means your dps would roughly be the same.
If you're getting this item for stacking AP champs (Diana, Ekko, etc.) then this is a net buff because between basic attacks you should be casting spells/repositioning, both of which require time to do that would overlap the time between basic attacks (in other words, if you get ast attack speed, casting time is still the same, so you won't be attacking faster anyways). In Diana's case, just aa, shield, aa, vacuum, aa, or something to that affect. Ekko is different because he doesn't even need it as heavily. His Spells give him all the stacks he needs to proc with a single auto attack.
Now, for Kayle/Teemo who have initial damage buffed with AP, then the DPS would be the same in most cases. Perhaps even burstier?