Questions tagged [caching]

For questions related to the effects of Mathematica's internal caching mechanisms.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Removing notebook cache from ExternalEvaluate

Question While working with Python's ExternalEvaluate the intermediate calculation results with Python are stored in the notebook. (...
Anton Antonov's user avatar
4 votes
0 answers

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 ...
Peter Burbery's user avatar
3 votes
1 answer

Memoization of functions with optional arguments

Consider the following function that generates a sparse diagonal matrix: ...
Heidar's user avatar
  • 263
2 votes
2 answers

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 ...
typedrums's user avatar
5 votes
3 answers

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 ...
wil3's user avatar
  • 253
1 vote
1 answer

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. ...
doublefelix's user avatar
7 votes
2 answers

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 ...
Leon Avery's user avatar
  • 1,332
6 votes
1 answer

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 ...
მამუკა ჯიბლაძე's user avatar
3 votes
1 answer

How to refresh or clear cached CloudObjects[]?

cross posted on Let's create an API which creates one file each time it is called/accessed: ...
Kuba's user avatar
  • 136k
5 votes
2 answers

NetModel's cache in which folder?

NetModel will produce a big cache file after you use it first time. ...
yode's user avatar
  • 26.4k
10 votes
1 answer

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,...
Nasser's user avatar
  • 137k
13 votes
1 answer

SquaresR memory leak?

I have tried the following code in Mathematica on my MacBook: ...
outofmemory's user avatar
8 votes
2 answers

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. ...
yode's user avatar
  • 26.4k
34 votes
2 answers

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 ...
matheorem's user avatar
  • 17k
1 vote
0 answers

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 ...
wiso's user avatar
  • 111
3 votes
1 answer

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 ...
Luboš Motl's user avatar
1 vote
0 answers

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 ...
my account_ram's user avatar
4 votes
0 answers

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: ...
Alexey Bobrick's user avatar
9 votes
1 answer

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 ...
Jacob Akkerboom's user avatar
17 votes
2 answers

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 ...
Vitaliy Kaurov's user avatar
11 votes
3 answers

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 (...
Isaac's user avatar
  • 3,169
13 votes
3 answers

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 ...
JxB's user avatar
  • 5,051