Message135727
| Author |
jcon |
| Recipients |
benjamin.peterson, daniel.urban, jcon, nirai, pitrou, stutzbach, vstinner |
| Date |
2011年05月10日.19:06:28 |
| SpamBayes Score |
3.4854788e-09 |
| Marked as misclassified |
No |
| Message-id |
<1305054390.14.0.664085358478.issue9971@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Victor: AFAIK its not actually downcasting. The safe downcast just uses an assertion when debugging is enabled. I chose to use it because it seems to be a convention in the file.
Antoine: You say quirky, I say elegant :) Though I have no problem changing it. Also, I did think about leaving the fast-path the way it was. I thought what I have now might be more simple/readable. On second thought I will put that specific code in front of the lock.
I do feel, for some fundamental reason, that readinto() *should* always be faster than read(). I may look into the buffer argument overhead you mention.
Also, while we're at it, would it be worthwhile for me to make a patch for the prefech() method you proposed? Should a separate issue be created for that? I know there was no definitive answer in the email thread but it may be fun to experiment with as well. |
|