Overview
| Artifact ID: | 068bec11f632fa4f8a2bfac2bb1c78819e151543 |
|---|---|
| Ticket: | 1366484fffffffffffffffffffffffffffffffff
patch: speed up lsort (follow on to 1360413) |
| User & Date: | afredd on 2006-03-19 20:57:12 |
Changes
- icomment:
File Deleted - 158409: File Added - 171463: tclCmdIL.c#1.86-patch4 Logged In: YES user_id=1386588 Found a couple more minor enhancements that shave off a few cycles here and there. Also cleaned up my code. Changes: 1. Added SortElementCache struct. 2. Defined SORTELEMENTCACHE_HAS_REAL behaviour. 3. Only SelectObjFromSublist if (sortInfo.indexc != 0) ie. save N function calls in common case 4. Store a -comand's objc in sortInfo saves NlogN calls to Tcl_ListObjLength. 5. nonUniqueCount ensures final result list is always preallocated to the correct length. Although timing does not reveal any speed gain either way, it does at least ensure a long living result of lsort does not take up unused space.
- login: "afredd"
- mimetype: "text/plain"
- username: "afredd"