Though both stocks are up year to date, HP Enterprise (HPE 0.30%) and Cisco (CSCO -0.40%) shareholders have had a bumpy ride in the last month or so, with shares declining 6% and 4%, respectively. Rumor has it that HP Enterprise will announce additional job cuts, though a spokesperson said its simply following through with its existing restructuring plan.

Cisco is also going through a transformation, which explains its own round of layoffs that began this quarter. As many as 5,500 employees, equal to 7% of Cisco's global workforce, will be let go. Neither Cisco's nor HP Enterprise's realignments are surprising given their push to expand in the cloud and Internet of Things (IoT) markets, but that hasn't prevented investors from getting antsy.

The upside is the recent share-price declines have made both HP Enterprise and Cisco even better investment opportunities, making the question of which is the better buy almost a toss-up.

Image source: Cisco.

Why Cisco is a good buy

Despite perceptions to the contrary, Cisco's decision to pare its workforce isn't purely about cutting overhead. The objective is to shift resources away from what Cisco refers to as "lower growth areas" so it can "further invest in key priority areas such as security, IoT, collaboration, next generation data center and cloud."

Impressively, even in the midst of Cisco's business transition, it's still performing admirably, particularly in the key areas that will drive future growth. Excluding Cisco's "other" unit and its now-divested SP video business, last fiscal year's best-performing divisions are a snapshot of CEO Chuck Robbins' strategic plan.

Security revenue climbed 13% in fiscal 2016 compared to a year-ago to $1.97 billion, and its collaboration unit -- its third-largest revenue source behind only legacy routers and switches -- increased 9% to $4.45 billion. Toss in the $3.7 billion in data center sales, much of which is cloud-related, and Cisco is already delivering where it counts. And Cisco's 3.5% dividend yield doesn't hurt either.

Image source: HP Enterprise.

Why HP Enterprise is a good buy

Change isn't always viewed favorably by investors, but the significant restructuring of HP Enterprise should prove to be a win-win before long. CEO Meg Whitman got the ball rolling earlier this year when she announced the tax-free spinoff and merger of HP Enterprise's second-largest unit -- enterprise services -- with Computer Sciences Corp.

The $8.5 billion deal with CSC includes a 50% stake in the new "pure-play" powerhouse, a $1.5 billion cash dividend, and HP Enterprise will rid itself of $2.5 billion in debt. For an encore, HP Enterprise also announced a similar deal for its "non-core software assets" with U.K.-based Micro Focus. The $8.8 billion merger with Micro Focus also includes an ownership stake of 50.1% for HP Enterprise shareholders, along with a $2.5 billion one-time payment for Whitman and team.

By the end of March 2017 -- the expected closing dates of the mergers -- HP Enterprise shareholders will own shares of three separate entities, pocket a nice dividend, and Whitman will be closer to her strategy of "creating a faster-growing, higher-margin, stronger cash flow company." Enterprise services did generate $4.7 billion in revenue last quarter, but it was also HP Enterprise's lowest margin unit by a wide margin, and software was its worst-performing division.

Shedding businesses not related to HP Enterprise's core competencies will help it focus on what it does best: delivering Infrastructure-as-a-Service (IaaS) in the cloud. This year, IaaS is expected to become a $294 billion market, easily making it the cloud's largest segment, and HP Enterprise is poised to garner its share.

HP Enterprise and Cisco both offer tremendous upside in fast-growing markets, but the latter's stellar 3.5% dividend yield makes it the better buy for growth and income investors. But when it comes strictly to appreciation potential, a leaner more focused HP Enterprise gets the nod.