Equivalent of Perl chomp?
Michael Hudson
mwh at python.net
Mon Feb 4 05:51:06 EST 2002
"Tim Peters" <tim.one at home.com> writes:
> A few things going on in this test under the covers:
>
> + endswith does indeed pay a large price for building a bound
> method object every time. It's not only the dict lookup to
> resolve "endswith", but also malloc and free to build the
> bound method object and discard it afterwards.
Method objects have a free list, so you're not really paying for a
malloc/free most of the time. Actually, it looks like this free list
can only grow, so you'll never pay for the free...
Cheers,
M.
--
We've had a lot of problems going from glibc 2.0 to glibc 2.1.
People claim binary compatibility. Except for functions they
don't like. -- Peter Van Eynde, comp.lang.lisp
More information about the Python-list
mailing list