.
D 2008-01-24T16:00:24
J assignee msofer
J cmimetype text/plain
J comment The\scurrent\sINST_MULT\scode\sessentially\sdoes:\s"if\sboth\smultiplicands\sfit\sin\sx\sbytes,\sand\sthere\sis\sa\snative\s2x-wide\sinteger,\suse\sthat.\sOtherwise,\sbigint."\n\nI\spropose\sto\sadd\sa\snew\stest\safter\sthe\scurrent\stests,\sbut\sbefore\sgoing\sto\sbigint\smultiplication,\sthat\sessentially\sdoes:\s"if\ssum-of-log_2\sis\sbelow\ssizeof(intType),\suse\sintType\smult"\n\nThis\swill\smassively\simprove\sthe\sspeed\son\s64bit\splatforms\swhere\sints\sare\s64\sbits\s(*ILP,\sare\sthere\sany),\sas\sthey\scurrently\salways\smultiply\susing\sbigints.\n\nOn\sother\splatforms,\sit\swill\simprove\sthe\sspeed\sof\smultiplying\sa\ssmall\snumber\sby\sa\slarge\sone,\seg,\s(5*(1<<51)).\sThis\sis\sa\smuch\sless\scritical\scase.\n\nThe\scomputation\sof\sthe\slog_2\scan\sbe\sdone\srelatively\scheaply\susing\stable\slookups;\ssee\seg\shttp://www.cs.utk.edu/~vose/c-stuff/bithacks.html#IntegerLogLookup
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter msofer
J subsystem 56.\sLibTomMath
J title avoid\sbigints\sfor\ssome\smultiplications
J type RFE
K 1878989fffffffffffffffffffffffffffffffff
U msofer
Z c756c7fc8dbcd1b5911ac64b82a9b9ea