Questions tagged [caching]
For questions related to the effects of Mathematica's internal caching mechanisms.
23 questions
1
vote
1
answer
84
views
Removing notebook cache from ExternalEvaluate
Question
While working with Python's ExternalEvaluate the intermediate calculation results with Python are stored in the notebook. (...
4
votes
0
answers
105
views
Accelerate the retrieval time for Entity data
I like to use Mathematica to answer questions related to cities such as how many cities in the United States have a population greater than 100,000 and what the distribution of them would look like on ...
22
votes
2
answers
1k
views
How to download "ResourceFunction" packages onto a notebook, so I can place it in a USB and access it on a different computer
So I want to use "ResourceFunction" commands, but that requires internet, as it needs to retrieve it from the wolfram cloud. However, I want to access a number of them (such as, ...
3
votes
1
answer
153
views
Memoization of functions with optional arguments
Consider the following function that generates a sparse diagonal matrix:
...
2
votes
2
answers
230
views
How can I use FullSimplify output in function construction without having to re-FullSimplify? (Doubts about my workaround)
I have an expression that I want to use in a function definition. For concreteness let's take Gamma[k + 4]/k!. I know this can be simplified to ...
5
votes
3
answers
339
views
Forcing NDSolve not to store full solution, in order to save memory
When using NDSolve to integrate a time-varying dynamical system (ie, an initial value problem), I often only care about the final value of the dependent variables ...
1
vote
1
answer
490
views
Cache a function in mathematica
I have a function of one variable $f(x): \mathbb{R}\to \mathbb{C}$ which is very difficult to evaluate. Single evaluations may take hours, and I need to use the function at a large variety of points.
...
7
votes
2
answers
790
views
Does Mathematica reuse previous computations?
I am doing an analysis of experimental results in which I need to repeat the same GaussianFilter hundred of times on different data. As explained in the ...
6
votes
1
answer
509
views
Clever caching of a recursively defined function
I've got a function of the form f[n,s] where n is a natural number and s is a finite ...
3
votes
1
answer
151
views
How to refresh or clear cached CloudObjects[]?
cross posted on community.wolfram.com
Let's create an API which creates one file each time it is called/accessed:
...
5
votes
2
answers
352
views
NetModel's cache in which folder?
NetModel will produce a big cache file after you use it first time.
...
10
votes
1
answer
343
views
How to clear Integrate internal memory?
I noticed that when I call Integrate for the first time, on an integral that I know will take longer than the time limit I give it, it will abort for the first time,...
13
votes
1
answer
490
views
SquaresR memory leak?
I have tried the following code in Mathematica 11.0.1.0 on my MacBook:
...
8
votes
2
answers
268
views
How to save the caching produced in processing
As my this previous post.I get a custom function which can help me got some function contain a certain option.And I have put it in my "init.m" file.
...
34
votes
2
answers
810
views
GroupBy twice gives different results
Bug introduced in 7.0 or earlier and persisting through 11.1
It took me quite a lot of time to finally trace down to this strange output. I really don't know why.
First, I create a list
...
1
vote
0
answers
109
views
Evaluation of likelihood very slow
I am trying to implement a simple statistical model for the first time in Mathematica.
My model is made my one random variable which is the sum of background and signal. Background is an exponential ...
3
votes
1
answer
228
views
May I restrict caching to disk when memory runs low? [duplicate]
An hour ago, I had to hard reset my laptop again because Mathematica froze the system again. When import a large file or make a mistake that produces huge arrays with complicated entries etc., I often ...
1
vote
0
answers
439
views
Speeding up inversion of symbolic matrices by invoking caching
Is it possible to reduce the computation time taken to find inverse of symbolic matrices USING CACHING TECHNIQUES accessible (if any)?
I am trying to compute inverse of symbolic matrices of size ...
4
votes
0
answers
436
views
Memory problem with producing complex graphics of general type
The problem I am about to ask has appeared once here: Memory Leak in Frontend - anyone know a workaround?. However, in this question I would like to put it in a bit different context.
Problem recipe:
...
9
votes
1
answer
425
views
Caching of Graph Graphics
In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
17
votes
2
answers
1k
views
Built-in Mathematica data: are they cached? how to speed up the loading?
Mathematica has numerous built-in data for science and math. Every first call to a data function in a new Mathematica session will "re-initialize indices" (download the data). Is there a way to store ...
11
votes
3
answers
634
views
Making sure that Timing[] isn't thrown off by caching
In playing with and comparing the various answers to my question here, I tried applying Timing[] to see how fast things ran, but it seemed that some of the answers (...
13
votes
3
answers
452
views
Memoization of Rounded inputs
Memoization is a technique for improving performance by having a function remember its previous arguments. For example,
f[x_]:=f[x]=mySlowFunction[x]
will be ...