Look at your polars, because every boat is slightly different.
In general, though, boats of medium performance or less tend to be fastest on a beam reach, and slower and slower as you approach either a dead run or hard on the wind. That is because on a beam reach you have maximum power from DRAG -- the wind simply pushing the boat without lift
involved, without reducing the apparent wind speed with your own speed. You also get some lift
on a beam reach.
Once you point closer to the wind than is optimum, speed falls off drastically.
Dead downwind you get no lift from the sails
-- just drag. And your own speed reduces apparent wind 1:1. So this is slow.
The last two things is true of all sailboats.
Boats with better performance and with good sails
in general sail fastest on a close reach. That is because a better performance boat with good sails has a better balance between lift and drag, and can use lift profitably at higher angles to the wind. With the wind ahead of the beam, your speed increases the apparent wind, and a boat with good sails can use that to sail even faster than on a beam reach.
Really FAST boats make a LOT of apparent wind. So you generally avoid ever sailing DDW in such boats. With enough speed, you can make your own wind and turn a deep angle into more of a reach, so this is fast making faster -- climbing up on your own speed. It's one thing which makes sailing fast boats more interesting, much more interesting, than sailing slow ones.