[SDL] A better rand()?

Samuel taxtropel_news at yahoo.com
Wed Mar 12 17:40:02 PST 2003


Oops, never mind.


On Wednesday 12 March 2003 5:21 pm, Samuel wrote:
> I'm doing some work with fractals and, well, I'm spending a whole lot of
> time in rand() and I was wondering if there was a better alternative?
>
> Here's the break down of the profiling
> % time     seconds   usecs/call     calls      function
> ------ -----------       ----------- ---------   --------------------
>  83.68   79.397830        39      2000090     rand
>  16.19   15.365268        38      400008      SDL_MapRGB
>   0.05    0.047411        5926         8          SDL_Flip
>   0.04    0.039446       39446         1         SDL_SetVideoMode
>   0.02    0.016070          64          251          SDL_PollEvent
>   0.01    0.013374       13374        1         SDL_Quit
>   0.01    0.005306        5306         1         SDL_Init
>   0.00    0.000117          14         8          SDL_UnlockSurface
>   0.00    0.000109          13         8            SDL_LockSurface
>   0.00    0.000027          27         1           srand
>   0.00    0.000023          23         1 	    time
> ------ -----------       ----------- --------- --------------------
> 100.00   94.884981               2400378 total

-- 
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety. "
--Benjamin Franklin





More information about the SDL mailing list