<i>Bad performance using ** operator with integer operands</i> status still Open with 4 other changes
by
.
D 2007-08-07T05:20:00
J icomment \n\nFile\sAdded\s-\s240154:\spower.patch\n\nLogged\sIn:\sYES\s\nuser_id=99768\nOriginator:\sNO\n\nThe\sattached\spatch\sis\sworking\stoward\sa\ssolution.\n\nObservation\s#1:\sPowers\sof\s2\sare\sthe\ssame\sas\sshifts\sof\s1,\sand\sare\shandled\sthus.\n\nObservation\s#2:\sFor\s32-bit\sintegers,\sa\svery\sefficient\sexponent\scan\sbe\scomputed\sby\sdoing\sspecial-case\sstraight-line\scode\sfor\sraising\sto\spowers\s3-8,\sand\sthen\susing\stable\slookups\sfor\shigher\spowers\s(up\sto\s3**19\sand\sup\sto\s10**10).\s\n\nObservation\s#3:\sFor\s64-bit\sintegers,\sa\ssimilar\scomputation\scan\sbe\sdone\swith\sstraight-line\scode\sfor\sraising\sto\spowers\s3-16,\sand\sthen\stable\slookup\sfor\shigher\spowers\s(up\sto\s3**39\nand\sup\sto\s14**17).\s\s\n\nI\shaven't\stried\sto\simplement\s#3,\sbecause\sI'm\snone\stoo\scertain\show\sto\sinitialize\nTcl_WideInts\sat\scompile\stime\swith\svalues\sthat\sdon't\sfit\sin\san\sint.\n\nThe\spatch\sshould\sbe\scommitable\sas\sit\sstands\s(resulting\sin\sperformance\sgains\sonly\son\s32-bit\smachines),\sbut\sobviously\s#3\sis\simportant,\stoo.\nFile\sAdded:\spower.patch\n
J login kennykb
J mimetype text/plain
J username kennykb
K 1767293fffffffffffffffffffffffffffffffff
U kennykb
Z 95aa7179482fb61c2110e4f036c7cb8f