[issue18588] timeit examples should be consistent

2014-08-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c39457a07caa by Ezio Melotti in branch '3.4':
#18588: update the timeit examples to be consistent.
http://hg.python.org/cpython/rev/c39457a07caa

New changeset 45b208ae9eab by Ezio Melotti in branch 'default':
#18588: merge with 3.4.
http://hg.python.org/cpython/rev/45b208ae9eab

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2014-08-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Examples updated, thanks for the report!

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2014-06-29 Thread Ezio Melotti

Ezio Melotti added the comment:

I tried to run those timings again and the values I got from the terminal are 
close to the ones I got from the interactive interpreter.
I'm not sure why when I wrote those examples I got such different values.
It would be fine with me to update them and avoid confusion.

> In command-line invocation the gc is disabled.
> And timit.repeat() is used instead of timit.timit().

Looking at the current code it seems to me that the command-line uses 
timeit.repeat(), that repeat calls timeit.timeit(), and that timeit.timeit() 
disables the gc.  Maybe back then it was different; that would explain why I 
got different results.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2014-06-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> I did find it somewhat confusing when trying to interpret 
> the timeit documentation.

Perhaps that is a good thing.  Making good, repeatable, meaningful timings  
where you have a clear interpretation of the results is non-trivial, learned 
skill.   Cross-checking results and explaining differences are fundamental 
skills.  There is really no reason the docs should try to make it look easier 
that it really is (running the tool is easy, but interpreting results sometimes 
isn't).

> Being a somewhat pedantic and trivial patch, I'm fine if you 
> want to close it wontfix.

That is reasonable.  I don't that this has caused any actual impediment to 
learning how to use timeit.  The docs have been somewhat successful in that 
regard.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2014-06-19 Thread Mark Lawrence

Mark Lawrence added the comment:

@Steven you're into timeit, do you have anything to add here?

--
nosy: +BreamoreBoy, steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2013-08-08 Thread Clay McClure

Clay McClure added the comment:

There's a 68% difference in running time between the command-line and 
programmatic invocations shown in the current documentation, and a 1% 
difference between the runtimes shown in the patch. I can't speak for why that 
is the case, but I did find it somewhat confusing when trying to interpret the 
timeit documentation.

Being a somewhat pedantic and trivial patch, I'm fine if you want to close it 
wontfix.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2013-08-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In command-line invocation the gc is disabled. And timit.repeat() is used 
instead of timit.timit().

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2013-08-08 Thread Ezio Melotti

Ezio Melotti added the comment:

IIRC those were the actual values I got.  I think I investigated why they were 
different, but right now I don't remember if I found out why.

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
versions:  -Python 2.6, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2013-07-29 Thread Clay McClure

New submission from Clay McClure:

The timeit module documentation includes examples of command-line and 
programmatic invocation, but the results between the two sets of examples don't 
agree.

This patch brings the results into agreement with each other.

--
keywords: +patch
Added file: http://bugs.python.org/file31076/18588.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18588] timeit examples should be consistent

2013-07-29 Thread Clay McClure

Changes by Clay McClure :


--
assignee: docs@python
components: Documentation
nosy: claymation, docs@python
priority: normal
severity: normal
status: open
title: timeit examples should be consistent
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com