Setting all other variables aside for a moment, "racing around" is something ill-defined and quite subjective, but it is entirely plausible that something like hard acceleration, while not in the short term, can get you better mileage in the long run.
To understand why this might be the case, you need to understand the power band. An engine's performance is typically rated by torque and horsepower.
The torque specification will usually be measured as the maximum torque an engine can produce at a given speed (RPM), while horsepower will measure the maximum amount of power also at a rated speed. Thus the power band is generally defined as the operating speed between the values of which peak torque and horsepower operate.
In this illustration, take the "flexible" engine. It has a peak torque rated say at about 245 ft-lbs @ 2500 RPM with horsepower peaking at about 225 @ 5500 RPM. The power band would be somewhere between 2500-5500 RPM. Rarely are these graphs nicely curved as pictured here. The torque would usually start drop immediately after its peak.
When the engine is operating within the power band, it is producing power the most efficiently. Under ideal operating conditions (maximum engine load and throttle), an engine will produce power the most efficiently at peak torque RPM.
But these conditions almost never happen on the road for a sustained period of time, so you will never have the maximal efficiency and so it's not guaranteed that it will be at that speed in typical driving conditions. In-fact the torque and power curves will typically be different depending on the engine load and throttle.
In order to understand these conditions, you would have to look at a BSFC or SFC (Brake / Specific Fuel Consumption) map of your vehicle, if one exists.
Edit to clarify: To lessen confusion, SFC can simply be thought of as fuel consumption divided by power. The lower the SFC number, the more fuel efficient it is at that speed. You usually see in these graphs that the engines run most efficiently at maximum throttle. That is because a wide-open throttle provides the engine with a really lean air/fuel mixture, meaning it's heavily aspirated (has a lot of air compared to fuel) and can burn it with relative ease and high efficiency.
As user1936752 stated, the best way to achieve this would be to drive in the highest gear possible as to maintain the lowest RPM to maintain a given speed. It would mean giving your engine a good amount of throttle.
So it's very possible that when you're "racing around" you're operating in the power range and so are increasing fuel economy in the long term. Generally when trying to maximize fuel economy, it's often recommended you accelerate briskly. Of course if you're not looking ahead you might have to brake and consume more fuel to accelerate.