The regularizers are built during calling with metaprogramming. Every time you call
TV() it creates a new version which is evaluated with
eval. In the first
deconvolution routine it has to compile this piece of code. To prevent the compilation every time, define
reg = TV()
which is then later used as a variable. In a notebook or REPL environment just define it in a different cell.
Often the results are good without regularizer but then need to be early stopped (e.g. like
iterations=20). This increases the performance drastically, but might lead to more artifacts in certain regions.
You can also try to adjust the settings of the L-BFGS algorithm of Optim.jl Try to change
m is the history value of the L-BFGS algorithm. Smaller is usually faster, but might lead to worse results. See also Wikipedia.
L-BFGS uses LineSearches.jl. In our examples
BackTracking turned out to be the fastest, but it might be worth to try different ones.
Try to set the keyword
iterations=20 to a lower number if you want to early stop the deconvolution. Of course, the results might be worse then.