It hasn’t been a smooth ride for the railroads this year as energy and mining markets have kept digging themselves a deeper hole. However, Canadian National Railway Company  (TSX:CNR)(NYSE:CNI) doesn’t seem to be hurting. While slightly down year to date, the stock has outperformed peer Canadian Pacific Railway Limited  (TSX:CP)(NYSE:CP) and the broader market by a considerable margin.

CNR Chart

CNR data by YCharts

So how did CN win investors’ trust in 2015, and can it continue to do so in the upcoming year?

The key area where CN beat CP

Weak coal, energy, and metals markets didn’t hold CN down. Its revenue improved 6% during the nine months through September, backed by strong shipments to automotive and forest industries and the continued strength in its intermodal segment. But it was CN’s efficiency that caught the market’s attention this year.

Lower fuel and labour costs drove CN’s operating income up by 16% during the nine-month period. That may fall behind CP’s incredible 23% growth in operating income, but CN was a notch above when it came down to the essential measure of efficiency for railroads: the operating ratio, which compares a company’s operating expenses to its net sales. The lower the ratio, the better it is.

CN had a tremendous year in this regard, with its third quarter proving to be a particularly strong one as its operating ratio improved five percentage points to 53.8%. While both CN and CP are reaping the benefits of low fuel costs, CP ended its third quarter with a much higher operating ratio of 59.9%, proving that there’s more to CN’s lower expenses than just macro factors.

Marked improvement in its operating income boosted CN’s net income by 12% during the nine months through September. Comparatively, CP’s net income was flat during the period. So CN stock’s relatively stronger performance this year wasn’t unjustified.

Investors also cheered when CN raised its dividend by a whopping 25% this year. That makes it the company’s 19th straight year of dividend increases.

Canadian National's dividend payout history. Source: Company financials

Canadian National’s dividend-payout history. Source: company financials

That’s not all. CN also announced a fresh share-repurchase program worth 4.9% of its outstanding shares this past October to supplement its ongoing program, evidencing the company’s commitment towards its shareholders.

What to expect going forward

CN expects to end FY2015 with double-digit growth in earnings per share, and I don’t see a reason why it shouldn’t continue to grow its profits next year. If fuel prices remain low, CN should be able to maintain its operating ratio below 60%.

Meanwhile, investors can expect greater rewards as CN moves towards its target dividend-payout ratio of 35%. CN currently pays out only about 28% of its profits in dividends. At the same time, CN is also investing in its business by revamping its track infrastructure, improving yards, and overhauling its fleet of locomotives.

Investments for the future combined with a declining operating ratio that indicates a greater ability to grow profits when revenue growth is slow should propel CN forward in 2016 and beyond.

If you're hunting for solid dividends, Canadian National may not make the cut just yet. So we compiled a list of dividend stocks for you to consider as 2016 approaches.

Top dividend stocks to own now

These three top stocks have delivered dividends for shareholders for decades (and even centuries!). Check out our special FREE report: "3 Dividend Stocks to Buy and Hold Forever". Click here now to get the full story!

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Neha Chamaria has no position in any stocks mentioned. David Gardner owns shares of Canadian National Railway. The Motley Fool owns shares of Canadian National Railway. Canadian National Railway is a recommendation of Stock Advisor Canada.