John O'Connor <tehj...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to