The acme-memorandom package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

A library for generating random numbers in a memoized manner. Implemented as a lazy table indexed by serialized StdGen. Monomorphism is used to facilitate memoization, users should adapt their design to work with random Int values only.

In a benchmark, the initial generation of 100000 random Ints took 10.30 seconds and consumed 2.5 gigabytes of memory. Generating the 100000 Ints again from the same seed only took 2.06 seconds, a 5-fold speedup thanks to memoization!

Incidentally, generating the 100000 Ints with the non-memoized function took 0.12 seconds, but that of course lacks all the benefits of memoization.


[Skip to ReadMe]

Properties

Versions0.0.1, 0.0.2, 0.0.3, 0.0.3
Change logChangeLog.md
Dependenciesbase (==4.*), MemoTrie (==0.6.*), random (==1.*) [details]
LicenseMIT
CopyrightCopyright © 2015 Johan Kiviniemi
AuthorJohan Kiviniemi <devel@johan.kiviniemi.name>
MaintainerJohan Kiviniemi <devel@johan.kiviniemi.name>
CategoryACME
Home pagehttps://github.com/ion1/acme-memorandom
Bug trackerhttps://github.com/ion1/acme-memorandom/issues
Source repositoryhead: git clone https://github.com/ion1/acme-memorandom.git
UploadedFri May 15 23:38:19 UTC 2015 by ion

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for acme-memorandom-0.0.3

[back to package description]

acme-memorandom

Hackage

A library for generating random numbers in a memoized manner. Implemented as a lazy table indexed by serialized StdGen. Monomorphism is used to facilitate memoization, users should adapt their design to work with random Int values only.

In a benchmark, the initial generation of 100000 random Ints took 10.30 seconds and consumed 2.5 gigabytes of memory. Generating the 100000 Ints again from the same seed only took 2.06 seconds, a 5-fold speedup thanks to memoization!

Incidentally, generating the 100000 Ints with the non-memoized function took 0.12 seconds, but that of course lacks all the benefits of memoization.