So I tried using the /give command to give myself a sword with an attack speed of 1024, which is the maximum value. However, the sword does not increase the attack damage; I only deal 1 health point of damage per hit. I know this because I tried killing a Creeper with the sword, and it took 20 hits to kill it. Creepers have 20 health points, so the sword only deals 1 health point. The higher the attack speed is, the more fully charged hits you'll be able to do per second; that's what it's supposed to do. But it doesn't work. Just make it so an attack speed of 1024 removes the attack cooldown entirely; this would be really useful for servers who have PvP games but also want to use up-to-date versions of Minecraft. Thanks.
Attack speed doesn't increase damage, it increases... attack speed.
Spawning an item with specified attributes will cause it to only have the attributes you gave it. This means spawning a sword with only attack speed will make it not have a damage modifier because you didn't give it one.