In Wednesday's Republican primary debate, moderator Becky Quick challenged Carly Fiorina over her tenure as CEO of HP between 1999 and 2005. "Someone who invested a dollar when you took office had lost half of the dollar by the time you left," Quick said. "Your board fired you. I just wonder why you think we should hire you now. "

Quick is right: HP struggled under Fiorina's management and it hasn't done that well since then. But it wasn't entirely, or even mostly, Fiorina's fault. HP's poor financial results under Fiorina's tenure mostly occurred because she ran the company during a severe economic downturn.

Fiorina was certainly not as talented a CEO as peers such as Apple's Steve Jobs or Amazon's Jeff Bezos. But she seems to have been a competent and effective CEO who led HP through challenging economic times.

HP was a mess when Fiorina took over

The reality is that Hewlett-Packard was a deeply troubled company when Fiorina took it over, and she did quite a bit to turn it around.

HP had a half century of spectacular success between its founding in 1939 and the late 1980s. Under the leadership of founders Bill Hewlett and Dave Packard, the company grew from two employees to tens of thousands. It became a sprawling company with profitable businesses in electronic instruments, computers, printers, and much more.

Fiorina wasn't a CEO who made big bets

But during the 1990s, the elderly founders became less and less involved in the company (Packard ultimately died in 1996, Hewlett in 2001) and the company fell on hard times. HP had always had a highly decentralized structure, giving engineers in each of the company's many divisions a great deal of autonomy. Under Fiorina's jovial predecessor, Lew Platt, this decentralized structure was taken to extremes. And Fiorina biographer George Anders has argued that this led to a dysfunctional corporate culture:

It was easy for [employees] to regard HP as nothing more than an endless cookie jar, dispensing whatever resources employees needed to pursue their favorite interests. Increasingly, HP was being defined by the intensity of its recycling program, its community activism, and its after-hours orchestra, rather than by its commitment to win brilliantly and relentlessly in the business arena.

The result: during the late 1990s, a time when the rest of the tech industry was enjoying an unprecedented economic boom, HP lagged behind. Anders writes that in 1998, HP's sales "advanced only 9 percent, one of HP's worst showings in history."

Fiorina was a detail-oriented manager, not a visionary

The best business executives develop ambitious new visions for the companies they run — think, for example, of Steve Jobs developing the iPhone.

The least successful executives, on the other hand, are executives whose ambitious visions fail. For example, the merger of AOL and Time Warner in 2000 was an attempt to create a new kind of media company — and it didn't work at all. Combining a traditional media company with a dial-up ISP made no sense, as Time Warner was forced to admit three years later when it took a huge write-down on its AOL assets.

Fiorina loved to say that HP and Compaq "fit together like a zipper."

But Fiorina wasn't a CEO who made these kinds of big bets. She was more of a detail-oriented manager, looking for a lot of small ways to make the organizations she ran more efficient.

Even Fiorina's biggest and most controversial move — acquiring computing rival Compaq — fit this pattern. The merger wasn't supposed to help HP enter major new markets or transform how HP did business. Instead, the idea was that the two companies would be able to do the things they already did more effectively if they joined forces.

Management consultants who examined the merger for HP found that (as Fiorina loved to put it) HP and Compaq "fit together like a zipper." HP was strong in markets where Compaq was weak, and vice versa. The merged companies would be able to find some cost savings by eliminating redundant facilities and personnel. And Fiorina believed that HP needed to get bigger to go toe-to-toe with IBM in the lucrative market for corporate services, where a broad range of product offerings is essential.

Fiorina wasn't a great CEO, but she wasn't a failure either

Fiorina announced the merger proposal in September 2001, and it soon ran into stiff opposition. Bill Hewlett's son Walter opposed the deal, and he rallied the rest of the Hewlett and Packard families to his cause. After a bitter campaign, Fiorina won a razor-thin shareholder vote with 51 percent support.

The merger occurred in the midst of the 2001-3 recession, which was particularly brutal for technology companies

Hewlett's critique of the deal was simple: Compaq was primarily a PC company, and the PC business was not very profitable. By merging with Compaq and swapping stock between the companies, HP was effectively trading a share of its more profitable businesses — especially its lucrative printer business — for a share in Compaq's less profitable PC business.

Hewlett also argued that the merger would cause distractions and culture clashes that would ultimately wind up costing more than the potential cost savings.

So who was right? It's hard to say. There's little doubt that the merged company didn't achieve the lofty financial results Fiorina had projected when she was promoting the deal. And it's true that there were few profits to be found in the PC business in the years after the merger.

However, the merger occurred in the midst of the 2001-03 recession, which was particularly brutal for technology companies. HP and Compaq would have struggled even if they had stayed as separate companies. And while losses in the PC sector were bad, it's quite possible that the efficiency gains achieved in other parts of the company more than offset the increased exposure to the PC business.

One of Fiorina's critics, Andrew Ross Sorkin, asserts that "Hewlett-Packard is still recovering" from the merger. But he doesn't cite any hard evidence for this. And the same seems to be true of the many other Fiorina takedowns that have popped up over the years: they all claim she ruined the company, but it's hard to find any hard numbers to back up the the claim.

It's also true that Fiorina's own boasts about her tenure don't really stand up to scrutiny. Fiorina liked to boast that she "doubled revenue" during her time at the company, but that's largely because of the Compaq merger rather than organic growth she created. She also claims to have boosted the company's growth rate, but that seems to be the result of cherry-picking statistics.

The bottom line seems to be that Fiorina's tenure was neither a big failure nor a big success. She managed HP during one of the most difficult periods in Silicon Valley history, and was forced to lay off tens of thousands of people. That has naturally made her a lightning rod of criticism. But the evidence that she ran the company into the ground just isn't there.

The board that fired Fiorina was deeply dysfunctional

Critics have cited Fiorina's firing, which occurred about three years after the merger, as another piece of evidence that she did a poor job running HP, but the firing may be a reflection of HP's dysfunctional board more than problems with Fiorina's leadership.

We don't know exactly why Fiorina was fired. In Fiorina's version of the story, the firing came about after Fiorina reacted angrily to an anonymous board member leaking private information to the press. In her memoir, Fiorina claims the board never explained why she was being fired or gave her a chance to address her critics' concerns. And as far as I can tell, HP board members have never given a clear explanation for why they let her go.

What we do know is that the board that fired Fiorina proved to be highly dysfunctional. After Fiorina's departure, the board became embroiled in allegations that it had used legally dubious means to obtain peoples' phone records in an effort to determine the source of the leaks that had occurred in the runup to Fiorina's firing. Board chair Patricia Dunn was forced to resign in 2006 as a result of the scandal.

Of course, the fact that the board was troubled doesn't prove that Fiorina's firing was unjustified. But neither does the fact that she was fired demonstrate Fiorina was doing a poor job. The firing may have been the result of personality conflicts, less-than-stellar performance, or — most likely — some combination of the two.

And as Fiorina pointed out in Wednesday night's debate, one member of the board that fired her, venture capitalist Tom Perkins, now says he regrets the decision. In a full-page New York Times ad funded by a pro-Fiorina super PAC, Perkins argued that Fiorina had been a "transformational leader" at HP and endorsed her for president.

We shouldn't read too much into Fiorina's tenure at HP

Ultimately, I think Fiorina's performance as the CEO mostly reflects favorably on her potential to be president of the United States. She's an energetic and accomplished executive with a wealth of experience managing large organizations. Her victory in the Compaq merger fight — which required many weeks of grueling meetings and phone calls with shareholders to convince them of the deal's merits — suggest that she has the kind of political skills and work ethic the presidency would demand.

Fiorina did not have a transformational vision for HP, and is never going to rank among the best CEOs in Silicon Valley. But that's asking the wrong question — like judging Ben Carson's fitness for the presidency based on whether he was a great doctor or just a pretty good one. The real question is whether she can convince voters that she has the best vision for the country's future.