SAN FRANCISCO -- Twitter is laying off up to 336 employees, signalling CEO Jack Dorsey's resolve to slash costs while the company struggles to make money.

The cutbacks announced Tuesday could equate to about 8 per cent of Twitter's workforce of 4,100 people.

The purge comes two weeks after Twitter brought back one of its co-founders as permanent CEO in hopes that Dorsey would be able to resolve problems that have slowed user growth at the messaging service and compounded an uninterrupted cycle of financial losses.

Cutting costs can boost profits but at Twitter, it has also raises uncertainty about the future, the company's pursuit of faster growth and its ability to attract a bigger audience.

The layoffs may be a sign of desperation at a sinking company, said Edison Investment Research analyst Richard Windsor.

"It is important to run a tight ship, but simply cutting jobs is often the action of a company that does not know what else to do," Windsor said.

Dorsey told Twitter employees in a Tuesday letter that a more streamlined company will result in more products rolling out more quickly. "We feel strongly that engineering will move much faster with a smaller and nimbler team," Dorsey wrote.

Twitter's workforce has nearly doubled over the past two years, hindering efforts to turn a profit for the first time in its nine-year history. Since Dorsey and his partners started the service, Twitter has lost nearly $2 billion.

When reports of the anticipated layoffs surfaced late last week, investors initially fretted that Dorsey might be reacting to disappointing performance in the quarter that just ended in September. Twitter eased those worries Tuesday by disclosing that its revenue for the period will hit or slightly exceed its previously target of $545 million to $560 million. The official results are due out Oct. 27.

Twitter's stock gained 99 cents, or 3.5 per cent, to $29.74 in midday trading Tuesday.

Dorsey has acknowledged that Twitter is too confusing for many people to use, turning off new users at a time when other social services such as Snapchat and Facebook's WhatsApp have grown in popularity.

As part of its revival plan, Twitter last week unveiled a new feature called "Moments" that packages commentary, video and photos about major events that have captured people's attention. The work on Moments began while Dorsey's predecessor, Dick Costolo, was still Twitter's CEO.

After returning as CEO, Dorsey promised to make Twitter even more accessible to the masses by next year. Jettisoning jobs will give Twitter more financial leeway while it designs new tools.

Twitter's expenses through the first half of the year climbed 44 per cent to $1.2 billion. The company's revenue totalled $938 million during the same period.

Retrenching will cost Twitter $10 million to $20 million, mostly to pay for employee severance packages. The accounting charge for the reorganization is expected to be lower, ranging from $5 million to $15 million, because Twitter some of the departing employees will be losing stock options that didn't vest.