Re: random numbers
- Posted by Derek Parnell <ddparnell at big?on?.com> Nov 22, 2007
- 565 views
CChris wrote: > > Derek Parnell wrote: >> ... if only there was a built-in swap operation for even faster run times. >> swap s[r] with s[i] !!! > > Swap operation: I am not sure swap(sequence s,integer index1,integer index2) > would be much faster than current > }}} <eucode> > temp=s[index1] > implicit_temp=s[index2] > s[index1]=implicit_temp > s[index2]=temp > </eucode> {{{ > because of the overhead of routine calls. I said swap OPERATION and not swap FUNCTION. The idea being that there would be an in-built operation, like the arithmetic operations, that performs optimal swap functionality so we wouldn't have a function call overhead. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell