Issue590360
Created on 2002-08-02.20:42:10 by bckfnn, last changed 2002-09-17.16:29:54 by bckfnn.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
msort.java
|
bckfnn,
2002-08-02.20:42:54
|
the sort implementation |
|
|
|
msort.patch
|
bckfnn,
2002-08-02.20:43:20
|
Patch to PyList.java |
|
|
| msg2244 (view) |
Author: Finn Bock (bckfnn) |
Date: 2002-08-02.20:42:10 |
|
A port of Tim Peters wonderfully fast sorting code.
|
| msg2245 (view) |
Author: Tim Peters (tim_one) |
Date: 2002-08-02.21:54:10 |
|
Logged In: YES
user_id=31435
Oooooh. I wish I could have used Java for this -- nice port!
One caution: the assert() calls add significant expense. In
CPython, the preprocessor removes them in our release
build. When you get confidence in this port, you may want
to make assert() a nop too. Most (almost all? all?) of them
are asserting preconditions that ensure the algorithm won't
make any out-of-bounds array references, but Java already
checks that for you (in C, of course, it's a nightmare of
corruption and segfaults when indices go rogue).
|
| msg2246 (view) |
Author: Finn Bock (bckfnn) |
Date: 2002-09-17.16:29:54 |
|
Logged In: YES
user_id=4201
Slightly cleanedup version of patch committed. Debug output
deleted and assert removed commented out.
|
|
| Date |
User |
Action |
Args |
| 2002-08-02 20:42:10 | bckfnn | create | |
|