Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-12-24
00:52 • Closed ticket [1856994fff]: lsort speed patch plus 2 other changes artifact: eab0488b3a user: msofer
00:23 • Ticket [1856994fff]: 6 changes artifact: ec9f817263 user: dkf
2007-12-23
23:44 • Ticket [1856994fff]: 4 changes artifact: c4991aad4a user: msofer
23:40 • Add attachment cmdIL.diff to ticket [1856994fff] artifact: a9b50cdab0 user: msofer
23:40 • Ticket [1856994fff] lsort speed patch status still Open with 4 other changes artifact: 4ef16b3dbc user: msofer
16:40 • New ticket [1856994fff]. artifact: d2a25313b3 user: msofer

lsort speed patch

Closed / Accepted1856994fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-12-23 16:40:39
Attached a patch that speeds up lsort between 5 and 10% (on mcvoy's test: sorting 1000000 lines of Tcl source).

The patch moves up some code that was run at each comparison, insuring that it is run just once per element.

Not committed as there is a tradeoff: the mem reqs go slightly up. There is one extra field in struct SortElement (from 3 to 4 fields).

Opinions?
msoferplain2007-12-23 23:40:39
File Added - 259563: cmdIL.diff
msoferplain2007-12-23 23:44:56
Logged In: YES 
user_id=148712
Originator: YES

Note: lsort itself is likely to improve much more; 5-10% is the improvement for the whole benchmark, which also does IO of the million lines.
dkfplain2007-12-24 00:23:23
Logged In: YES 
user_id=79902
Originator: NO

Looks like it's a workable strategy. Commit if you want.
msofer Closed ticket [1856994fff]. [History diff]2007-12-24 00:52:41
Log in (anonymous is fine) to add a comment.

Attachments: