race gas or pump non ethanol premium, which to use

With Gasoline, the lowest octane fuel the engine can run on without detonation will make the most power. What car, gearing, and weight, and is it asphalt or dirt?