[m-dev.] Re: Random number generation package
Thomas Conway
conway at cs.mu.OZ.AU
Sat Sep 1 14:53:21 AEST 2001
On Sat, Sep 01, 2001 at 06:39:54AM EST, Kenneth Almquist wrote:
> My guess is that the efficient way to code this algorithm in Mercury
> is to extract all the values of the state into individual variables,
> compute the values which will go into the new state, and then create
> the new state. This would result in only one memory allocation per
> call, other than the allocations required to box floats. Three
> words of the state are used only to hold intermediate values in the
> random number generation process so this would also make the state
> smaller.
All the function calls get inlined, so only 1 allocation
per call should be happening anyway.
Thomas
--
Thomas Conway )O+
<conway at cs.mu.oz.au> 499 User error! Replace user, and press any key.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list