Skip to content
Tcl Source Code Artifact [1a99b345e0]
Login

Artifact [1a99b345e0]

Artifact 1a99b345e0eb982a1691b859038c206f5d620615:

Ticket change [1a99b345e0] - New ticket [1052584fffffffff|1052584fff] <i>O(1) space [range] command.</i>. by antirez on 2004-10-23 01:22:33.
D 2004-10-23T01:22:33
J assignee nijtmans
J cmimetype text/plain
J comment That's\sa\sfirst\sversion\sof\sthe\s[range]\scommand\nworking\sin\sO(1)\sspace.\sThere\sis\ssome\sminor\sbug\sI'll\sfix\ntomorrow,\sbut\sthe\sbasic\sstuff\sappears\sto\sbe\sok.\n\ncommands\saware\sof\sthe\snew\sarithSeries\sobject\nin\sthe\sTEBC\sand\snormal\sfashion:\n\nllength\nlindex\nforeach\n\nNew\scommands:\n\nOnly\s[range].\sThe\schange\sis\sminimal\sfrom\nthe\suser\spoint\sof\sview.\sFrom\sthe\score\nside\sis\sa\sbit\smore\stricky\sbecause\sof\sthe\sO(1)\nspace\saims.\n\nOther\sstuff\soptimized\sfor\sthis\sobject:\n\nSetListObjFromAny\swill\sdirectly\sconvert\sranges\ninto\slists\swithout\sto\spass\sfor\sthe\sstring\srepr.\n\nOpen\sissues:\n\nThe\scode\sneeds\sa\scheck\sin\sorder\sto\ndon't\sallow\sthe\sgeneration\sof\sranges\nthat\sare\slonger\sthan\sthe\smax\slistObj\slength\nsupported\sby\sthe\scurrent\sTcl\scode.\n\nFor\sthe\srest,\sI\sused\sWide\sInts\sin\sorder\sto\nensure\sthat\sranges\sshorter\sthan\sthe\smax\nlist\slength,\sbut\shaving\sas\selements\sWide\sints\nwill\swork.\n\nPerformance\schanges:\n\nThe\seffects\son\sthe\sperformances\sof\sthe\slist-oriented\nshould\sbe\svery\ssmall,\sthere\sis\ssome\stest\smore\nthan\sbefore.\s\n\nThe\scase\sof:\n\nforeach\sx\s[range\s0\s$n]\n\nis\sfaster\sthan\sthe\nequivalent\s[for]\sform\sby\s10%\sto\s30%\sfrom\na\sfirst\stest.\n\nThe\sappended\spatch\sshould\sapply\sagainst\sHEAD.
J foundin TIP\sImplementation
J priority 5\sMedium
J resolution None
J status Open
J submitter antirez
J subsystem 14.\sList\sObject
J title O(1)\sspace\s[range]\scommand.
J type Patch
K 1052584fffffffffffffffffffffffffffffffff
U antirez
Z d620a081be7e4a109bf2bd5345a0686f