Oil has hit a nine-month high and gasoline is screaming past $4 per gallon in some parts of the country. That news has some people worried that high gas prices will curb consumer spending and put a halt on our fledgling economic recovery.

It's true that high gas prices force consumers to cut back on spending that could help the economy. But high oil and gas prices aren't all bad for the economy. Since oil hit $140 per barrel in 2008, the oil dynamic in the U.S. has changed by leaps and bounds. We send much less of our oil money overseas and another spike in oil prices may lead to even more drilling and increased economic activity in some parts of the country.

More domestic production
High oil prices help make domestic production more economical and should further our production boom. Hydraulic fracturing costs have fallen to around $55 per barrel in some places, and oil priced at more than $100 per barrel makes it more economical to drill using fracking. Ultra-deepwater rigs alone can cost rig owners such as Seadrill (NYSE: SDRL) more than $500,000 a day, so explorers need high prices to absorb the risk associated with this expensive drilling. And as production increases, pipelines need to be built, so Enbridge Energy (NYSE: EEP) and its subsidiaries are expanding with more drilling in North Dakota. All of this economic activity is made possible by the high price of oil.

If course, it's a double-edged sword for Americans. On one side, drillers such as Kodiak Oil & Gas (NYSE: KOG) and Statoil (NYSE: STO), which are profiting from expanded shale production, will expand drilling, hire more workers, and generate more profits as the price of oil rises. If you're one of those workers, or investors, you're happy the price of oil is going up.

On the flip side, consumers don't have extra money to throw at the gas pump each month with the economy recovering slowly.

In the end, there are positives and negatives to high oil prices depending on where you're sitting. Just don't think it's all bad.

A new focus on alternatives
Whether you're a fan of natural gas, biofuels, wind, solar, or any other alternative energy source, you should be happy about the rising price of oil. When oil is cheap, alternatives are the last thing consumers and politicians have on their minds. When oil goes up, suddenly the urgency to find alternatives increases.

Whether it's Clean Energy Fuels' (Nasdaq: CLNE) natural gas highway, First Solar's solar farms in California, or the offshore wind developments that will connect to a Google-backed transmission system, the alternative energy industry likes high oil prices.

These alternative energy sources are still relatively young in their development, and rising oil prices will help them get more funding and be more competitive with oil-based alternatives.

Our dwindling reliance on foreign oil
As I pointed out above, there are a number of companies that will expand drilling on and offshore if oil prices remain high. That is making our reliance on foreign oil smaller and smaller by the day. Recent Energy Information Administration numbers show that in 2011 net oil imports fell nearly 1 million barrels per day to their lowest level since 1996. This was due mostly to expanded U.S. production, driven by growth in the Bakken shale play.

The U.S. now imports just 45% of the oil used here, down from 60% in 2005. Import levels haven't been that low since 1995.

What this means is that more and more of the money being spent on gas at the pump is actually swimming through the U.S. economy. Oil accounts for about 72% of the price of a gallon of gas, so considering our import levels, the overwhelming majority of each dollar spent at the pump ends up somewhere in the U.S. economy, a number that will keep growing as domestic oil production grows.

Some consolation at the pump
This may not be a consolation for everyone struggling with higher gas prices, but there are significant portions of the economy that improve when the price of oil rises. There are also plenty of investing opportunities, and our team of analysts has found three stocks that will benefit from high oil prices. Find out what they are in our free report here.