[BangPypers] Performance benefits of Generators?

Navin Kabra navin.kabra at gmail.com
Sat Jul 4 06:10:52 CEST 2009


>
> No not yet. I am not building a application where every mu-sec
> matters. I appreciate the link and comments though. Will be helpful
> some day in the future.

I guess my point is this:

If you've chosen python as a language for your app, you have pretty
much accepted that your application is not CPU bound. Hence you should
not be worrying about the extra CPU cycles taken by advanced languages
features. Use all possible language features (focusing on readibility
and maintainability and other such things). Don't worry about the CPU
performance unless there is a need to worry about, and even then, you
should be thinking in terms of replacing a key function with C code
rather than replacing a generator with a for loop.

navin.


More information about the BangPypers mailing list