What happened

Shares of Twilio (TWLO -0.50%) were gaining today after the cloud-based communications software company said it was laying off 11% of its workforce to rightsize the company and drive profitability.

As of 12:39 p.m. ET, the stock was up 11.2%.

So what

In a regulatory filing, management said it had approved a restructuring plan that would reduce costs, improve operating margins, and accelerate software sales. The 11% reduction in its workforce is the principal cost-cutting measure the company is taking. 

Twilio said the layoffs would result in $70 million to $90 million in charges, primarily in the third quarter, though it didn't offer a cost-savings number associated with the layoffs. The company also reaffirmed its guidance, calling for 30% to 32% revenue growth to between $965 million and $975 million in the third quarter. 

Now what

Like a number of other cloud stocks, Twilio shares have fallen sharply over the last year as market sentiment has turned away from high-priced, unprofitable growth stocks like Twilio. 

The stock is down roughly 80% from its peak last year, and Twilio disappointed the market again in its second-quarter earnings report in August as it called for wide losses in its third-quarter guidance.

Investors are clearly putting a premium on profitability, and are rejecting the growth-at-any-cost model that has been common in the cloud software sector. Until today's announcement, Twilio had made little progress in moving toward profitability, but that should change with the layoffs.

The market's reaction, sending the stock up double digits, should make it clear to Twilio management that the best way to recoup the stock's losses is by showing cost discipline and getting the bottom line out of the red.