At the 2012 Olympics, Weymouth, England put us to the test with ocean waves and big breeze. There were two exposed courses where a side swell wrapped around Portland and wind driven chop had a few miles of fetch to build up. In our three years training in Weymouth and three years in the ocean off Miami Beach, we learned a lot about how to make a boat go fast in chaotic (and big!) seas.
Technique is the most important variable. Bad tuning will make your life much more difficult, but the biggest difference in speed comes from how you steer, use your sails, and your weight.
Stable is fast. Keep the boat at the same angle of heel. Usually, a couple of degrees to leeward is good. At the crest of each wave you can be a touch flatter so the extra pressure does not round you up. Avoid too much ‘S-curve’ steering over the wave as this can slow the boat. Mostly, use an ease on the mainsail and extra hike to handle the power on the wave tops.
Boat balance is key. The boat will be loading and unloading a lot. When the pressure comes on, it needs to transfer to forward force and not to heading up and stalling (from too much heel and too tight mainsail). The boat should want to point a little, but not round up.
Steering and sail trim need to work together. When you bear away you must ease the main and when you head up you must trim. This is one of the single most important techniques to master as you change course in waves.
Hope this helps. Please comment if you have any thoughts or questions.