JuliaOcean / AIBECS.jl

The ideal tool for exploring global marine biogeochemical cycles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memoize some functions

briochemc opened this issue · comments

It might be beneficial performance-wise to memoize some functions with a single memory cache when running optimizations, especially if I can keep a lot in memory :) Memoize.jl seems to be able to do just that... From its ReadMe:

using Memoize
using LRUCache
@memoize LRU{Tuple{Any,Any},Any}(maxsize=2) function x(a, b)
    println("Running")
    a + b
end