Tesla used to list the horsepower rating of the various motors in the specs on their website, but apparently do not do so any longer. (Or I can no longer find them.)
Back when they did, they also distinguished between the horsepower of the motors themselves and the maximum power that could be delivered to the motors by the battery (which Tesla called the "Battery Limited Maximum Motor Shaft Power," or BLMMSP.
I captured some of those specifications when they were available in late 2015, as follows:
The 75D had motor sizes of 259 HP both front and rear, with a BLMMSP of 328 HP and torque of 387 lb-ft. That resulted in published 0-60 time of 5.2 seconds.
The 90D and 100D had motors of the same size as the 75D, with a BLMMSP of 417 HP and torque of 485 lb-ft, 0-60 in 4.2 seconds.
The performance models had a larger rear motor, with 259 HP in the front and 503 HP in the rear, and a BLMMSP of 463 for the P85D and P90D as of 11/1/2015. With Ludicrous, that became 532 HP. Torque was 713 on all three of the P models.
So far as I know, Tesla did not ever publish BLMMSP values for the P100D, or if they did I missed them.
The 0-60 times for the performance models were then listed as 3.1 for the P85D, 2.8 for the P90D, and 2.5 for the P100D with Ludicrous.
These data are all for Model S.
(If these figures are still published somewhere and I have missed where they are, please provide a link.)
So, bottom line, there are indeed physical differences in the motors for the performance models, and in addition the larger \batteries can deliver more power to the motors so the effective horsepower is higher. (Ludicrous mode also involves some different fusing for the battery, with unique software for the fuse itself.)