@Harel13 has provided the main answer, but I thought you might be interested in noting a fascinating article here (on pp.13-14) which provides further academic research to support Rashi's assertion that their spleens were removed to increase their speed and was indeed a common practise in the ancient world (in both the Roman and Greek culture).
The author notes interestingly, that to perform splenectomies, an incredibly complex medical procedure, especially in those times, would have resulted in a very high death rate. Even by the early twentieth century, such a procedure had a 28% mortality rate(!).
The author writes:
One plausible resolution to this question is in Rambam’s twelfth century medical writings, where he states that the dangerous splenectomies were never performed in King David’s time. Instead, Rambam insists that Adoniya’s soldiers were given herbal drugs that shrunk their spleens, thereby decreasing the inhibiting weight 1.
Rashi’s interpretation of the Gemara in Sanhedrin (21B) might be the basis of Rambam’s herbal interpretation. Rashi explains that the soldiers were given certain drugs that enabled safe spleen removal. Unlike Rambam, however, Rashi maintains that the spleens were definitely removed, and not just atrophied. Thus the question still exists, how could such a dangerous surgery have been performed in ancient times, even with herbal drugs and medicines?
1 Oren, M., Herman, J., and Elbaum, J. (1998). Men with No Spleens and Carved-Out Feet: What is the Meaning in the Words? Ann. Intern. Med. 129: 756-758.