It was a balmy night in Rio de Janeiro and a pretty J.P. Morgan Private Wealth representative was buying drinks for newly paper-rich entrepreneurs. Nearby at the pool of the city’s only Relais et Chateaux property mingled investors who had flown in from New York, San Francisco, London and Berlin.

The next morning the Hotel Santa Teresa’s projector beamed countless up-and-to-the-right charts as entrepreneurs presented their well-funded ideas to the participants of Founders Forum Brazil 2012.

Few of those companies still exist today.

The hype of that era is long gone, overwhelmed by a political and economic crisis that regularly fills the front pages of global newspapers. However, unfazed by the high-profile failures of many foreign-backed startups, technology in Brazil continued its forward march. While Brazil’s overall GDP fell 4 percent in 2015, the tech industry has been largely immune to the slowdown, growing 20 percent from 2014-2015.

Contrary to conventional wisdom, venture investments in Latin America have also consistently grown from those heady days, reaching US$594 million in 2015, up from US$387 million in 2012, according to the Latin America Venture Capital Association. Surprisingly, recession-racked Brazil consumed 63 percent of the region’s total investment, with the city of Sao Paulo receiving the lion’s share of VC dollars.

The reality is that the recession and political crisis created a clear divergence of fortunes among Brazil’s technology companies. Many of the companies that presented at Founders Forum Brazil 2012 were plays on the emergence of Brazil’s middle class. The entrepreneurs and investors were wagering that these newly empowered consumers would snap up furniture, shoes and baby supplies at record rates. Unfortunately, an economy fueled by ever-looser credit and constantly increasing government spending could not last.

As in most countries, recessions lead to belt-tightening among companies and consumers. Just as expected, the technology companies that thrived are those that offer consumers and businesses a way to improve efficiency and sustainably reduce their costs. Examples include small business SaaS ERPs like Conta Azul and Omie, consumer productivity apps like Gympass and GuiaBolso, and companies that facilitate B2B transactions like Intelipost and Loggi.

The relative unconcern about the recession among Brazilian technology entrepreneurs was evident last week at the award gala hosted by Latam Founders Network, a group made up of founders, executives and investors from across the region. Camera crews from all of Brazil’s major television stations were there to cover what Brazil’s leading business magazine, EXAME, dubbed the “Oscar for Startups.” Companies competed in eight categories, including B2C, Best Investor, and Most Innovative. (Full disclosure: My company, Gaveteiro.com.br, was nominated in the B2B category). Past winners have included Printi, Nubank and iFood, all of which went on to raise large rounds.

Taking home the prizes were companies that fit the trend of efficiency-driving technology. Contabilizei, SaaS accounting software, won in the B2B category. Dr. Consulta, a chain of low-cost, technology-enabled health clinics serving poor areas, won Most Impactful. Finally, Pipefy, a SaaS workflow tool with global ambitions, won Most Innovative. Entrepreneur of the Year went to Bruno Pierobon, CEO of Zup, a company focused on helping companies deal with all the complexities of systems integration and outsourcing services.

Investors, too, have recognized this trend. Kaszek Ventures, one of the region’s largest funds, has invested heavily in B2B and consumer finance (credit card interest rates in Brazil can pass 200 percent a year). Eight of their last 10 investments listed in CrunchBase have been in these two categories. Ditto for Redpoint eventures, another large fund focused on Brazil that took home this years’ Investor of the Year award.

No one knows the final outcome of Brazil’s political crisis — until now it has been an unpredictable cross of Gabriel Garcia Marquez’s surrealism and Netflix’s House of Cards. What we do know, however, is that efficiency-driving innovation will have its place, come whatever market environment. Those entrepreneurs and investors who can thrive in a tough macroeconomic scenario are surely well-positioned for long-term success in the world’s seventh-largest economy.