diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2017-12-12 14:52:17 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-12-12 18:11:22 +0100 |
commit | 6c80641d54a95f2da95e480a4a746761d25161e9 (patch) | |
tree | 21983ada914456407f571ffc2b08421ed7dba72f /tests/scripts.scm | |
parent | 252c4083779a488c86e74362b4f3bb4bf927cc67 (diff) | |
download | gnu-guix-6c80641d54a95f2da95e480a4a746761d25161e9.tar gnu-guix-6c80641d54a95f2da95e480a4a746761d25161e9.tar.gz |
memoization: Profiling support keeps track of lookups and hits.
* guix/memoization.scm (<cache>): New record type.
(define-lookup-procedure, define-update-procedure): New macros.
(cache-ref, cacheq-ref, cache-set!, cacheq-set!): New procedures.
(cached/mv, cachedq/mv, cached, cachedq): Use them instead of 'hash-ref'
and 'hash-set!'.
(%make-hash-table*): When 'profiled?' returns true, return a <cache>
object.
(define-cache-procedure): Adjust to show cache lookups and hits.
Diffstat (limited to 'tests/scripts.scm')
0 files changed, 0 insertions, 0 deletions