Skip to content
Tcl Source Code Artifact [f550fecb92]
Login

Artifact [f550fecb92]

Artifact f550fecb92a1ecd363fc8a58a0288b786b444b45:

Ticket change [f550fecb92] - Ticket [466037ffffffffff|466037ffff] <i>Optimise getting the head/tail of a list</i> status still Open with 5 other changes by kennykb on 2001-10-03 22:28:56.
D 2001-10-03T22:28:56
J assignee kennykb
J icomment Logged\sIn:\sYES\s\nuser_id=99768\n\nThe\schanges\sI'm\sworking\son\sfor\sTIP\s#22\salready\shave\sa\sTcl_ObjType\sfor\s'end-'\sindices.\s\sNote\sthat\s\nTcl_GetIntForIndex\sshould\sbe\sextremely\sfast\sif\sthe\sindex\sis\sconstant\sbecause\sthe\sfirst\scouple\sof\slines\sof\s\ncode\scheck\sfor\s'int'\sand\s'index'\sobjtypes,\sand\sthe\sstring\srep\sis\sexamined\sonly\sif\sboth\sthose\schecks\sfail.\n\nWe\smay\sat\ssome\spoint\swant\sto\srevisit\swhat\shappens\sfor\s[lindex\s$list\send-$i],\sbut\sthat's\sfarther\sout.\n\nFor\swhat\sit's\sworth,\swhat's\scompiled\sfor\s[lindex\s$list\s$i],\swith\s$list\sand\s$i\sboth\slocal,\sis\n\n\s\s\s\sINST_LOAD_SCALAR1\s<var\s#\sfor\slist>\n\s\s\s\sINST_LOAD_SCALAR1\s<var\s#\sfor\si>\n\s\s\s\sINST_LIST_INDEX\n\nFor\s[lindex\s$list\s0],\sit'll\sbe\n\n\s\s\s\sINST_LOAD_SCALAR1\s<var\s#\sfor\slist>\n\s\s\s\sINST_PUSH1\s<literal\s#\sfor\s0>\n\s\s\s\sINST_LIST_LINDEX\n\nINST_LIST_LINDEX\sdoes\sindeed\scall\sTclGetIntForIndex,\sbut\sthat's\sbeen\schanged\sto\sbegin\swith\slooking\sfor\s\ntclIntType\sand\stclEndOffsetType\sand\snot\sdo\sany\sparsing\sif\sthe\sobject\sis\salready\sa\sknown\stype.\n\nLet's\ssee\show\sthat\sdoes\son\sthe\sbenchmarks\sbefore\swe\stry\sto\ssqueeze\sany\smore\sout\sof\sit.\n
J login kennykb
J mimetype text/plain
J username kennykb
K 466037ffffffffffffffffffffffffffffffffff
U kennykb
Z bcecddbb79ab24fe652c00012de1970d