[m-rev.] diff: optimize divisions and shifts by constants

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Dec 25 15:24:48 AEDT 2014


As discussed earlier.

Unfortunately, we cannot automatically turn X / 2 into X >> 2
or into X unchecked_right_shift Y because if X is a variable,
simplification cannot know whether it is known to be non-negative.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.shift
Type: application/octet-stream
Size: 1109 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141225/9e7847d6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.shift
Type: application/octet-stream
Size: 13379 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141225/9e7847d6/attachment-0001.obj>


More information about the reviews mailing list