Re: Why is UInt32 << 32 a no-op?
Re: Why is UInt32 << 32 a no-op?
- Subject: Re: Why is UInt32 << 32 a no-op?
- From: Alastair Houghton <email@hidden>
- Date: Tue, 17 Nov 2009 19:50:59 +0000
On 17 Nov 2009, at 18:49, Eric A. Borisch wrote:
> If you're on a 64-bit platform, this shouldn't have much (if any) of a
> performance hit:
>
> n = (UInt64) n << shift
Though it will still be undefined if shift happens to go higher than 64.
That might seem obvious, but consider the case where shift is calculated somehow; it's pretty easy to end up with it largely unbounded if you aren't careful.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden