Put aside all the commodity market angst ("Oh, no! Copper was down a penny.... Oh my gosh, steel prices didn't climb another 10%! The end of the world must be at hand....), and the fact remains that literally tons of this stuff is in demand every day of every week of every month. How do you get that coal, metal, timber, or grain from miner/logger/farmer Bob to Amalgamated Conglomerates, Inc.? Often you use the rails.

To that end, Canadian National Railway (NYSE:CNI) had another great quarter. A 21% increase in carloads translated into a 19% increase in revenue for the first quarter. Assuming an average exchange rate of 0.826, CN posted revenue of $1.4 billion for the quarter and operating income of over $434 million. It should also be noted that unfavorable currency moves hurt CN's revenue by about $50 million and operating income by nearly $21 million.

While fuel costs were 36% higher in the quarter, CN's management did a great job of controlling expenses, and the company's operating ratio dropped 3.3% to 69.2% -- a record for the company in the first quarter.

CN saw revenue gains across all of its commodity cargos, with metal and minerals up 49%, forest products up 26%, and coal up 10%. The only patch of weakness was once again the auto sector, as the company saw 6% less revenue from auto shipments.

CN also generated a considerable amount of free cash flow for the quarter. While the company uses a somewhat different calculation from what I use (it subtracts dividends and adjusts for accounts receivable sold), the number I arrive at is $355 million. CN management shared some of this with shareholders in the form of repurchasing 4.6 million shares during the quarter, and unlike many companies that use share buybacks to keep up with their own dilutive option rewards, CN actually reduced its shares outstanding on a year-over-year basis.

In discussing earnings, management said nothing to suggest that a slowdown in traffic was imminent. While acknowledging that rampant price inflation in many commodities has slowed, the company hasn't yet seen a drop-off in shipping demand and is able to pass through rate increases.

Of course, this sort of supplier's market can't go on forever. Sooner or later, more trucks and railcars will come online and absorb the demand that's pushing up rates, and there's always a risk that an economic slowdown will curtail industrial demand for basic materials. Until that happens, though, Canadian National remains one of the best railroads out there, and I strongly suggest that anyone looking to invest in the rails at least take a second look at this company before selecting a rival.

For more on the iron horses:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).