Re: RNG Test: Code to generate Diehard file in Euphoria
- Posted by Everett Williams <rett at GVTC.COM> Feb 17, 2000
- 744 views
Lewis Townsend wrote: >Hello > >> >> Irv Mullins wrote: >> >> >> >> printf(file_number, >> > >> "%04x%04x%04x%04x%04x%04x%04x%04x%04x%04x", >> > >> {final[ 1],final[ 2],final[ 3],final[ 4],final[ 5], >> > >> final[ 6],final[ 7],final[ 8],final[ 9],final[10]}) >> >> >True again, except that the de-referencing of members of a sequence >> >x[1], x[2],x[3].... etc, does affect performance: There's a 10 - 15% >>increase >> >in execution time when applied to this list of 20. >> > As opposed to what substituted construct is this 10-15% slower and do you mean in the whole program or in the trivial case where the loop is 2 or some such silliness. I cannot imagine a compiler so silly as to make much difference between what you see above and the printf(file_number,fmt,final) -- previously proposed code I can see that the initial interpretation of the loop might take 10-15% longer, but when spread across 600,000 iterations, who cares. Now if that really is 10-15% longer in the 600,000 case, then we've got something worth examining. Everett L.(Rett) Williams rett at gvtc.com