The late, great—I know it’s a cliché but he was—Buddy Melges, when asked how to drive a boat well upwind, would say that the secret is keeping the angle between the headstay and horizon constant.
For us lesser helmspersons, an inclinometer makes this way easier.
I was just about to fit one to our J/109 when I realized that the smart compass I installed last winter also measures heel angle and sends that out on the NMEA 2000 network, so it was just a matter of moments to add it to one of the cockpit readouts.
Once the boat is fully powered up, sailing a constant heel angle through the puffs and lulls is a way faster and more comfortable way to helm upwind than just following the jib telltails.
Excessive heel is also a not-so-subtle hint that it’s time to reef.
Nothing more than 20 degrees is fast on the J/109, flatter with a full crew on the rail.
The M&R 56 is fastest up wind at about 23-25.
Boats that are not as easily driven will need more heel, and full-keel boats with a lot of wetted surface are often fastest at high angles—as much as 35 degrees.
That said, many people, particularly those new to sailing, let the boat heel too much.
Anyway, every sailboat should have a way to display heel angle. If your autopilot compass does not have this feature, a simple inclinometer will do.