SAN FRANCISCO — Jack Dorsey has been permanent chief executive of Twitter for slightly more than a week. He has already decided that to grow, the company needs to shrink.

Twitter announced on Tuesday that it was laying off as many as 336 employees, or 8 percent of its work force, to streamline and refocus as it tries to find ways to attract new users to its social network.

“We are moving forward with a restructuring of our work force so we can put our company on a stronger path to grow,” Mr. Dorsey, one of the founders of Twitter, wrote in an email to employees. “We feel strongly that engineering will move much faster with a smaller and nimbler team, while remaining the biggest percentage of our work force. And the rest of the organization will be streamlined in parallel.”