mem {FedIRT} | R Documentation |
Memoization Function for Speed Optimization
Description
A simple memoization function that stores the results of expensive function calls and reuses those results when the same inputs occur again. This technique greatly speeds up the computation of fedirt
function by caching previously computed values.
Usage
mem(f)
Arguments
f |
Function to be memd. |
Value
Returns a memd version of function f
that will cache its previously computed results for faster subsequent evaluations, especially beneficial when applied to fedirt
.
Examples
# To mem a function, simply wrap it with `mem`:
mem(function(a,b){return(a+b)})
[Package FedIRT version 1.1.0 Index]