The acme-memorandom package

[ Tags: acme, library, mit ] [ Propose Tags ]

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

Versions 0.0.1, 0.0.2, 0.0.3
Change log ChangeLog.md
Dependencies base (==4.*), MemoTrie (==0.6.*), random (==1.*) [details]
License MIT
Copyright Copyright © 2015 Johan Kiviniemi
Author Johan Kiviniemi <devel@johan.kiviniemi.name>
Maintainer Johan Kiviniemi <devel@johan.kiviniemi.name>
Category ACME
Home page https://github.com/ion1/acme-memorandom
Bug tracker https://github.com/ion1/acme-memorandom/issues
Source repository head: git clone https://github.com/ion1/acme-memorandom.git
Uploaded Fri May 15 23:38:34 UTC 2015 by ion
Distributions NixOS:0.0.3
Downloads 477 total (8 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-05-18 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's 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.