Author: Uri Blass
Date: 19:51:38 09/11/03
Go up one level in this thread
On September 11, 2003 at 22:02:04, Ricardo Gibert wrote: >On September 11, 2003 at 08:03:13, Uri Blass wrote: > >>My natural choice is not to use unsigned for varaibles if there is no special >>reasons. > > >I have the reverse preference, because: > >1 - Sometimes faster as noted by others in this thread. > >2 - In some instances, the use of negative numbers results in undefined or >implementation specific behavior and I prefer to dodge this issue by using >unsigned e.g. possibly_some_negative_number >> >possibly_some_other_negative_number. > >3 - Array bounds checking is simpler e.g. if (index > array_upper_bound) >index_is_out_of_array_bounds. > >4 - You don't have to worry as much about one's complement versus two's >complement issues. > >5 - I'm sure there is some other reason I can't think of right now. Yes My reason is very simple I was too lazy to write unsigned for every varaible writing int is faster than writing unsigned int. Of course I may solve the problem by defining unt as unsigned int. Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.