Message181754
| Author |
pitrou |
| Recipients |
ezio.melotti, gvanrossum, pitrou, serhiy.storchaka |
| Date |
2013年02月09日.19:58:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1360439933.66.0.882068038126.issue17170@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Some crude C benchmarking on this computer:
- calling PyUnicode_Replace is 35 ns (per call)
- calling "hundred".replace is 125 ns
- calling PyArg_ParseTuple with the same signature as "hundred".replace is 80 ns
Therefore, most of the overhead (125 - 35 = 90 ns) is in calling PyArg_ParseTuple() to unpack the method arguments. |
|