generator expressions: performance anomaly?
Antoon Pardon
apardon at forel.vub.ac.be
Wed Jan 19 04:35:59 EST 2005
Op 2005-01-18, Jeremy Bowers schreef <jerf at jerf.org>:
> On Tue, 18 Jan 2005 14:05:15 +0000, Antoon Pardon wrote:
>> I don't see how generating byte code for a = 9; when seeing the
>> expression a = 3 + 6, would be a problem for non-functional
>> languages.
>
> To answer nearly every post you've made to this thread, "because Python
> doesn't have the resources to program to special cases".
I was countering an argument that seemed to state doing something
like that was impossible on principle in python.
I was not argueing people should put any effort in this, just countering
it would change python beyond recognition.
> Ultimately, the use is fairly limited; I can't imagine the execution time
> saved would reach the time of implementation for weeks after a release,
> even aggregating across all Python use in the world, and "real time
> gained" (i.e., time useful to a human) would probably never add up to the
> implementation time. So why bother? That's a horrid trade off when there
> are so many other real gains to be had.
Well if it isn't worth the bother, so be it. I can still dream about it.
--
Antoon Pardon
More information about the Python-list
mailing list