So yes, depending on the nature of your code, its quite conceivable to find distinct performance differences between code using the __main__ idiom and code without.
But -- it should be emphasized -- it's faster thanks to running code (an doing name lookups) within a function, and *not* thanks to using the __main__ idiom (i.e. 'if __name__ == "__main__":' condition). Cheers, *j -- Jan Kaliszewski (zuo) <z...@chopin.edu.pl> -- http://mail.python.org/mailman/listinfo/python-list