Skip to content
Tcl Source Code Artifact [66444387de]
Login

Artifact [66444387de]

Artifact 66444387dea0e9fd03497527e65be571224ddab8:

Ticket change [66444387de] - New ticket [2800722fffffffff|2800722fff] <i>big integer parsing is O(N^2)</i>. by dgp on 2009-06-03 21:07:21.
D 2009-06-03T21:07:21
J assignee dgp
J cmimetype text/plain
J comment \nInteger\svalues\s\sup\sto\s917476\sbits\s(see\sTIP\s237)\nget\sstored\sin\sa\sspecial\spacked\sTcl_Obj\sintrep\sfor\nmp_ints\s.\s\sTo\sparse\sa\sstring\srep\sof\san\sinteger\sof\s\nthat\ssize\srequires\sabout\s30\sseconds,\sand\sthe\nstring\srep\sgetting\sparsed\sis\sroughly\s200000\s\ndigits/characters/bytes\slong.\n\nLarger\sinteger\svalues\sare\spermitted\susing\san\nunpacked\sintrep\srepresentation.\s\sHowever,\nimagining\sstring\sreps\sgrowing\sup\sto\sTcl's\nlimits\sof\sroughly\s2000000000\sdigits/chars/bytes,\nthe\sN^2\salgorithm(s)\sused\sto\sparse\sbite\shard,\nand\sa\sreasonable\sguess\sis\sabout\s40\syears\nto\sparse\ssuch\sa\sstring\sinto\sits\smp_int\nequivalent.\n\nAn\salternative\swith\ssmaller\scomplexity\sfor\sswitching\sover\sto\sat\nsome\spoint\sis\sneeded\sif\soperations\son\sthese\nvalues\sare\sever\sto\sbe\sof\sany\sactual\suse.\n\nThe\ssame\sproblem\sin\sreverse\sarises\swhen\nproducing\sthe\sstring\srep\sof\sa\slarge\smp_int\nvalue.
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 48.\sNumber\sHandling
J title big\sinteger\sparsing\sis\sO(N^2)
J type RFE
K 2800722fffffffffffffffffffffffffffffffff
U dgp
Z 53d1c8c38ff907746d34c6ef74f25b85