Skip to content
Tcl Source Code Artifact [fb61a56b2d]
Login

Artifact [fb61a56b2d]

Artifact fb61a56b2d8a4edbfb4b380972402400f4be1363:

Ticket change [fb61a56b2d] - Ticket [1052584fffffffff|1052584fff] <i>O(1) space [range] command.</i> status still Open with 4 other changes by antirez on 2004-10-25 15:07:59.
D 2004-10-25T15:07:59
J icomment \n\nFile\sAdded\s-\s106349:\srange5.patch\n\nLogged\sIn:\sYES\s\nuser_id=67765\n\nNew\spatch\sattached\s(range5.patch).\sThe\sidea\sis\sto\smerge\swhat\sI\nthink\sare\sthe\sbest\spoints\sof\sMiguel's\sand\smy\spatch,\nthere\sare\salso\srandom\sbugfixes.\n\nDescription\sof\sthe\scurrent\sstructure:\n\n-\sThe\sarithSeries\sobject\sis\sa\sstandalone\sobject,\sthere\nis\sno\scode\sabout\sit\sin\sthe\sList\sobject\smetod,\sbut\nsetListFromAny\sknows\show\sto\sconvert\san\sairthmetic\s\nsequence\sto\sa\slist\swithout\sto\spass\sfor\sthe\sstring\srepr.\n\n-\sThe\scommands\slindex,\sllength\sand\sforeach\sknows\sabout\nthe\sarithmetic\sseries\sobject\sin\sorder\sto\savoid\sto\sconvert\ninto\sa\slist.\n\n-\sLike\sin\sthe\sMiguel's\spatch,\sthere\sis\sno\slonger\sa\sreference\nto\sa\swide\sobject\sinside\sthe\srange,\sthis\swas\spossible\smodifing\nthe\scode\sin\sTEBC\susing\sthe\sMiguel's\simplementation\sidea.\n\n-\sLike\sin\sMiguel's\spatch\snow\sthere\sis\sa\sflag\sin\sthe\sarithmetic\nsequence\sobject\sthat\stells\sus\sif\severy\selement\sof\sthe\srange\ncan\sfit\sor\snot\sin\san\sInt,\sor\sif\sit\srequires\sa\sWide.\sSo\swhere\npossible\sthe\sInt\sobjects\sare\sused\sin\splace\sto\sWide\sones.\n\n-\sThe\spatch\swas\supdated\sto\sreflect\sthe\snew\score\schanges\njust\scommited\sby\sMiguel.\sInstead\sof\sfive\sad-hoc\schecks\sto\nsee\sif\sit's\spossible\sto\supdate\sa\svariable\sdirectly\swithout\sto\npass\sfor\sthe\susual\sAPI,\sthere\sis\snow\sa\sfunction\sto\stest\sfor\nthis\scondition\sin\sa\svery\sclean\sway.\n\n-\sRanges\swith\snegative\sstep\sare\snow\sfixed.\sIn\sgeneral\sthe\nalgorithm\sthat\scomputes\sthe\slength\sof\sthe\slist\sis\snow\sbetter\nand\sshould\sbe\sdefinitive\sat\sthis\spoint.\n\n-\sThere\sis\snow\sa\stest\sfor\sthe\s[range]\scommand,\sand\sfor\n[foreach],\s[lindex],\s[llength]\sin\srelation\sto\sthe\snew\sobj\stype.\nNot\sin\sthe\spatch,\sbut\sattached\sas\sa\sdifferent\sfile\shere.\n\nShould\sbe\sall\sfor\snow.\n
J login antirez
J mimetype text/plain
J username antirez
K 1052584fffffffffffffffffffffffffffffffff
U antirez
Z caa57914e35ecf29442cd4e0d7df7300