This is obvious, but this article discusses how to achieve peak horsepower by winding your engine out (i.e., hitting its rpm sweet spot). Looking for Free Horsepower? Wind Your Engine Out - Hagerty Media
The converse of this is also true. Back in the late 60s/early 70s, manufacturers under reported horsepower by taking dyno readings before an engine hit its peak rpm power. They were trying to avoid high insurance rates and get a competitive edge at the drag strip. A classic example of this was the 340. Chrysler rated it at 275 hp. @5,000 rpm. In actuality, it produced its maximum power (325 hp.) @6,000 rpm. High performance small block: Mopar 340 V8