New submission from icedream91:
I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 ,
and I got a correct answer.
When I wanted to check how long it took, I found something strange:
When I ran 23.py directly, it showed that it took about 13s. But if I use
timeit
Changes by icedream91 icedrea...@gmail.com:
Removed file: http://bugs.python.org/file30633/23.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18252
___
icedream91 added the comment:
I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 ,
and I got a correct answer.
When I wanted to check how long it took, I found something strange:
When I ran 23.py directly, it showed that it took about 13s. But if I use
timeit module,
Richard Oudkerk added the comment:
I think if you use timeit then the code is wrapped inside a function before it
is compiled. This means that your code can mostly use faster local lookups
rather than global lookups.
--
nosy: +sbt
___
Python
icedream91 added the comment:
I did some tests, Richard Oudkerk (sbt) is right. Thanks a lot.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18252
___
R. David Murray added the comment:
By the way, this kind of question is more suited to the python-list mailing
list (where you will in the general case get a faster answer anyway :)
--
nosy: +r.david.murray
stage: - committed/rejected
status: open - closed
Changes by Richard Oudkerk shibt...@gmail.com:
--
stage: committed/rejected -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18252
___
___
Changes by Richard Oudkerk shibt...@gmail.com:
--
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18252
___
___