Questions tagged [performance-tuning]
Questions on optimizing Mathematica code for higher performance. This may mean faster execution, lower memory usage or both. Not to be confused with mathematical optimization.
3,139 questions
1
vote
0
answers
33
views
Using the following compiled routine inside another routine?
Consider the following picker (binary search using a CDF) and some compiled code using it:
...
3
votes
2
answers
213
views
How to calculate a solution with Mittag-Leffler function
$f(p) = \sum\limits_{k=0}^{\infty} (v/D)^k L^{(\alpha-1)k+\alpha-3} E^{k+1}_{\alpha,(\alpha-1)k+\alpha-2}(-p/D L^\alpha)|_{L=1} = 0$,
$v=0.8\ cm/min, D=0.01\ cm^\alpha/min, \alpha =1.97, K=0.6\ 1/min$....
2
votes
1
answer
343
views
Is there a way to define this piecewise function so it can be integrated?
I want to calculate several derivatives and integrals involving a complicated periodic piecewise function, but I'm struggling to get it to work, and someone here suggested that part of the problem is ...
0
votes
0
answers
76
views
Need verification of a ChatGPT code for linear extensions of a partial order
This is sort of a continuation of Generating Linear Extensions of a Partial Order. It is about generating all those permutation lists p which satisfy ...
-1
votes
0
answers
48
views
NIntegrate with many exclusions slow down computation
I am trying to numerically integrate a complicated function f[t1, t2, t3] over $t_1,t_2,t_3 \in [-4,0]$.
The function is piecewise defined, known to have jump ...
4
votes
0
answers
155
views
Cover a 3D region with balls faster
Question
Suppose we have a 3D MeshRegion reg composed of 2D triangular faces. I want to find a (minimal-ish) list of balls, ...
5
votes
1
answer
181
views
Why is ListPointPlot3D extremely slow when plotting many points with per-point Style colors, and how can this be optimized?
I am generating a 3D band structure from a slab Hamiltonian and color-coding each eigenvalue by its IPR (defined from the corresponding eignvector, e.g., inverse participation ratio). The numerical ...
7
votes
1
answer
299
views
Fast Parallel Rasterization of Letters
I want to Rasterize large numbers of single characters quickly, not as a single image but many separate ones. Ideally each one has unique/shrinkwrapped dimensions, ...
1
vote
1
answer
166
views
$LLL$ implementation complexity in wolfram mathematica
$LLL$ is implemented in Wolfram Mathematica as $\mathsf{LatticeReduce}$ command. If we want to reduce a rank $k\leq n$ lattice in $\mathbb Z^n$ where the generator matrix of the lattice has integral ...
2
votes
1
answer
138
views
Performance issue when more than one texture is used
I ran it on version 13.0.1 for Microsoft Windows (64-bit) (January 28, 2022).
(the same bug persist even in the current newest version ...
4
votes
2
answers
187
views
Plotting contours of signed distance function slow and returning Max::nord error
I want to plot contours of the signed distance function of a region defined by an implicit equation: $R = \{ (x,y) : F(x,y) \le 0 \}$. As a trivially simple concrete example, we could take the region ...
0
votes
0
answers
161
views
Improving Mathematica performence on Windows 11
I have 128 GB of RAM on a Windows 11 desktop. I am doing 3D animations, and it is quite slow. I checked RAM usage, and it uses 26 GB at most. Is there a way to get Mathematica to use more available ...
2
votes
0
answers
94
views
Is there any way to parallelize MapThread@AssociationThread?
Consider this code:
...
4
votes
2
answers
166
views
Partitions of an integer into sums of nonnegative integer powers of its decimal digits
Problem statement: I am trying to write a function that calculates the number of distinct ways an integer can be expressed as a sum of nonnegative integer powers of its decimal digits and return this ...
0
votes
1
answer
160
views
Accelerate Mathematica code computing visibility polynomial of one graph
Let $G$ be a graph of order $n$. Then the visibility polynomial, $\mathcal{V}(G)$, of $G$ is defined as
$$
\\
\mathcal{V}(G)=\sum_{i\geq 0} r_i x^{i}
\\
$$
where $r_i$ denote the number of mutual-...