These are currently implemented very inefficiently, in Python: first a
loop over the string checks that the string has the proper format,
then eval() is called to parse and evaluate the number. I've done a
small check replacing the atoi() and atof() calls directly with eval()
and it reduces the time by half. eval() is still very inefficient; I
presume that with an atoi and atof coded in C, most overhead should
disappear. If these two functions are added to the built-in module
strop (string operations) then it will speed up most programs
retrospectively. Any volunteers to code it?
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>