summaryrefslogtreecommitdiff
path: root/Lib/test/sortperf.py
Commit message (Collapse)AuthorAgeFilesLines
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
|
* Issue #16706: get rid of os.errorAndrew Svetlov2012-12-181-1/+1
|
* Issue #14428: Use the new time.perf_counter() and time.process_time() functionsVictor Stinner2012-04-291-2/+2
| | | | | | | | | | | | * Replace "time.clock on windows, or time.time" with time.perf_counter() * profile module: only use time.process_time() instead of trying different functions providing the process time * timeit module: use time.perf_counter() by default, time.time() and time.clock() can still be used using --time and --clock options * pybench program: use time.perf_counter() by default, add support for the new time.process_time() and time.perf_counter() functions, but stay backward compatible. Use also time.get_clock_info() to display information of the timer.
* #8230: make Lib/test/sortperf.py run on Python 3.Georg Brandl2010-08-011-4/+4
|
* Merged revisions 55007-55179 via svnmerge fromGuido van Rossum2007-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines Use the new print syntax, at least. ........ r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line remove old cruftiness ........ r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line make this work with the new Python ........ r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line Get asdl code gen working with Python 2.3. Should continue to work with 3.0 ........ r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line Verify checkins to p3yk (sic) branch go to 3000 list. ........ r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line Fix this test so it runs again by importing warnings_test properly. ........ r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines So long xrange. range() now supports values that are outside -sys.maxint to sys.maxint. floats raise a TypeError. This has been sitting for a long time. It probably has some problems and needs cleanup. Objects/rangeobject.c now uses 4-space indents since it is almost completely new. ........ r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines Fix two tests that were previously depending on significant spaces at the end of a line (and before that on Python 2.x print behavior that has no exact equivalent in 3.0). ........
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-5/+5
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-1/+1
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* New test %sort. This takes a sorted list, picks 1% of the list positionsTim Peters2002-08-021-1/+7
| | | | | | | | | | | | | | | | at random, and replaces the elements at those positions with new random values. I was pleasantly surprised by how fast this goes! It's hard to conceive of an algorithm that could special-case for this effectively. Plus it's exactly what happens if a burst of gamma rays corrupts your sorted database on disk <wink>. i 2**i *sort ... %sort 15 32768 0.18 ... 0.03 16 65536 0.24 ... 0.04 17 131072 0.53 ... 0.08 18 262144 1.17 ... 0.16 19 524288 2.56 ... 0.35 20 1048576 5.54 ... 0.77
* New test "+sort", tacking 10 random floats on to the end of a sortedTim Peters2002-07-211-6/+9
| | | | | | | | | | array. Our samplesort special-cases the snot out of this, running about 12x faster than *sort. The experimental mergesort runs it about 8x faster than *sort without special-casing, but should really do better than that (when merging runs of different lengths, right now it only does something clever about finding where the second run begins in the first and where the first run ends in the second, and that's more of a temp-memory optimization).
* Added new test "3sort". This is sorted data but with 3 random exchanges.Tim Peters2002-07-201-1/+9
| | | | It's a little better than average for our sort.
* Gave this a facelift: "/" vs "//", whrandom vs random, etc. BoostedTim Peters2002-07-181-35/+46
| | | | | | | | | | | | | | the default range to end at 2**20 (machines are much faster now). Fixed what was quite a arguably a bug, explaining an old mystery: the "!sort" case here contructs what *was* a quadratic-time disaster for the old quicksort implementation. But under the current samplesort, it always ran much faster than *sort (the random case). This never made sense. Turns out it was because !sort was sorting an integer array, while all the other cases sort floats; and comparing ints goes much quicker than comparing floats in Python. After changing !sort to chew on floats instead, it's now slower than the random sort case, which makes more sense (but is just a few percent slower; samplesort is massively less sensitive to "bad patterns" than quicksort).
* Use random instead of whrandomAndrew M. Kuchling2002-04-101-3/+3
|
* String method conversion.Eric S. Raymond2001-02-091-3/+2
|
* Add Tim's worst case scenario.Guido van Rossum1998-05-261-6/+11
| | | | Revert to using whrandom so it will work with older versions of Python.
* Use random instead of whrandom.Guido van Rossum1998-05-201-4/+4
|
* Reduce memory requirements.Guido van Rossum1998-05-121-1/+4
|
* Add a few doc strings.Guido van Rossum1998-05-101-6/+31
|
* benchmark for list.sort()Guido van Rossum1998-05-101-0/+109