**1.696 performance-tuning questions.**

I've searched many questions about parallel processing here, and they are either specialized or over my head. I run the following parallel notebook on an 8 core EC2 instance. The average memory usage ...

When I do e.g.GE = FinancialData["GE", "OHLCV", "Jan. 1, 1918"]; // Timing {2.67188, Null}The output claims that the ...

Question. I am looking for more efficients ways to compute Newton's divided difference, i.e. the operator
$$\partial : f(x,y) \mapsto \frac{f(x,y)-f(y,x)}{x-y} \ , $$
for the case where $f$ is a ...

Consider an array of triplets:specup={{x1,y1,z1},{x2,y2,z2},...{xn,yn,zn}}.
The dimensions for specup are {1506006, 3}. The ...

I have a list of positions that I would like to use in an array. I came up with the following code to fill a Table with 'ones' in these positions, and 'zeros' everywhere else:
...

can someone please tell me why findroot performs poorly with jacobian ? in this example res1 is slower than res.
...

I have a FormPage with a function that, on average, takes several seconds to evaluate. This is entirely expected. However, ...

I have a question about how to use NIntegrate. I need to integrate a slightly different function thousands of times, one very much like the one I have posted below. ...

I have a plot as below (the plot is just for illustration purpose. in my real problem, I just have pts1):-
...

I have a data1 with 4 columns and would like to remove the duplications by looking at the first 3 columns. Thus I used below code:-
...

Cross posted to community.wolfram.com
Mathematica ships a variety of linear solvers through the interfaceLinearSolve[A, b, Method -> method]the most ...

1,
I am trying to make Compilable function which takes Matrix of zeroes and ones f.e:
...

I often have to deal with nonlinear shape optimization problems involving curves or surfaces surfaces. A classical example is Plateau's problem.
No matter if I use gradient-based techniques (such as ...

The two distributions are the same, except the ProbabilityDistribution cuts out below x=0. The wolfram documentation on ProbabilityDistribution says nothing about speed. A search of this site gave no ...

I am trying to do a numerical integration using Gauss-Legendre quadrature over rectangular regions. The equations used in the code below is given as:
$$ Q_{1}= \int_{c_{i}}^{d_{i}}\int_{a_{i}}^{b_{i}}...

I have two functions which calculate the same thing using different methods. Sometimes, the first method is much faster than the second method. Other times, the other way around. Just pretend this ...

I have an association dataset with a depth of two (each value is an association too, and the size of the dataset ~ 30000 keys and an average size of values are ~2000 keys association). The dataset ...

Rather by accident I discovered that throwing Simplify at the following "harmless" expression
...

I have a code with symbolic manipulations. It works fine but very slow (e.g. for w=14 it's reasonably fast but I want it to work for ...

I am cleaning a database and I need to clean also the location field. The data is taken from a forum, so the entrance are self compiled. For this reason I have a lot of weird and different stuff going ...

I am running a "big" program on my 32G RAM laptop. When MMA is running, roughly there is about 28G RAM "available" to use.
So I did a bit of a test.
...

Lets say I wanted to make a highly detailed graph of a 3D function. Generally I use something like
...

Is there a way to convert a list of string to numbers faster than ToExpression?
...

I had the idea of generalizing Conways Game of Life
from a regular lattice to act on a Poisson Voronoi mosaic (tessellation).
The code below works but is maybe not the best idea in terms of speed.
I'...

An interesting issue was raised in comments to the following question: Monitoring Plot3D with a given number of plotpoints.
We were discussing the fact that a ...

Basic Question
I have a looping calculation that I need to perform on some large lists a very large number of times, and as I have written the functions the computational speed is prohibitively slow. ...

I would like to discretize a series of HannWindows, but two issues arise. First, my manual implementation of HannWindow seems to ...

The serious flaw of Dynamic is a combination of facts:
it is triggered/refreshed by any kind of mutation of a symbol,
careful metaprogramming/construction of ...

Below is the expression I want to optimize, ('I' represent the imaginary unit):ParallelTable[Flatten[Exp[I*n*list]], {n, -10, 10}];as you can see I already ...

I am testing the first tip of this article
Use floating-point numbers if you can, and use them early.
I've compared a pair codes and finding it's not helpful to use the float-point number during ...

Given a table of data, the Fourier command gives the discrete frequency content of the data, where the resolution in frequency space is equal to 1/N, where N is the number of data points.
Higher ...

edit2:
The tweak suggested by Henrik Schumacher in Carl Woll's answer is so far a clear winner ($\times800$ over the benchmark); it's almost disturbing to contemplate how 'slow'-relatively speaking-...

The following code works, but is inefficient. I would like to find a better implementation.
The problem is the following. I have a list of points, representing a matrix of 2 columns and N rows. Each ...

I am reading this topic of boyd book from convex optimization, but the following division i-e trade-off least square and l2 norm are difficult to understand for me. If kindly someone can explain ...

I have a list, say {10,9,8,7,2,3,5,4,3,2,1}What I want to achieve is to delete the elements that are not in decreasing order recursively. Namely, the output ...

I have run a huge amount of code to find a 9 by 9 matrix called A. I want to use elements of this matrix in future when I open the Mathematica again. Is it possible? How can I do that? An step by step ...

I have the following code that has been running for more than three days without an answer, unfortunately. Now, my institution provides us with a computer with Intel Xeon CPU E-52650 v3 @ 20 CPU, 2....

I've been playing with a little compiled Ising model implementation. It's brutally slow. Decomposing things I've found that the primary culprit appears to be Mod. ...

Here and here it was explained how to use Experimental`NumericalFunction to compute the Hessian of a numerical function. I would like to know how this undocumented ...

I need to compute the eigenvalues of matrices of size 1000x1000. I create two symmetric matrices $A$ and $B$ where each entry $(i,j)$ is given by a function ($f$ for $A$ and $g$ for $B$) of $i,j$ and ...

Let be $ABCD$ is a tetrahedron, knowing that $ABC$ is an equilateral triangle $AB=a$, $AD=d$, $BD=e$, $CD=f$. I want to find the $a$, $d$, $e$, $f$ when the angle of two vectors $AB$ and $CD$ equal to ...

IntroPaneSelector looks like a pretty idiomatic way to toggle displayed content e.g.:
...

I am trying to find the best way of exporting matrices (results of a time-dependent CFD calculation). I found that .h5 is the fastest option, but h5 is not generic, i.e., I can't really open like a ...

I have a set of series like this:ϵ =
Sum[epsilon[order][v, θ, ϕ] (r - rp)^order, {order, 0,
MaxOrder}] + O[r, rp]^(MaxOrder + 1);and others e.g. ...

I'm setting up a fairly hefty numerical code dealing with matrices
of variable dimension, but on the order of hundreds of rows and columns.
I'm using a Module format:
...

Using Association to generate complicated data types is very comfortable, in particular if one uses those tricks from How to make use of Associations?. However, I ...

I have a matrix test = { {2.5,1.4,3.3},{4,4,4},{7,3.2,9}} and a function f that requires 2 arguments, the row number and the ...

I just noticed something weird (or at least unexpected).
If I run this code:
...

- list-manipulation
- matrix
- compile
- parallelization
- plotting
- numerical-integration
- programming
- equation-solving
- mathematical-optimization
- functions
- linear-algebra
- numerics
- image-processing
- differential-equations
- graphs-and-networks
- memory
- code-review
- graphics
- calculus-and-analysis
- dynamic
- manipulate
- function-construction
- evaluation
- import
- random

- Meaning of the phrase "womp womp" in American English?
- Asking same flight customers if they would agree to put my knife in their checked luggage
- Bake me some moji
- How to write a story without conflict, like "My Neighbour Totoro"?
- In a cemetery, what evidence could be found that humans were intelligent and had technology?
- It's now safe to turn off your computer
- Could I replace a hub on a wheel?
- Rename an alphanumeric file
- About to give in my notice, but suddenly got a raise. Will it reflect poorly on me if I still decide to leave?
- Why would we use direct current instead of alternating current?
- Why would magic users not try to take over kingdoms?
- Why h4 is the best move here?
- Does switching all contests to Roll vs Passive DC change the odds?
- How can I convey to my technologically inept parents that my IT job is mentally draining
- How to let a king be lost for a year and return back to his country, to regain his title without any problems?
- The Jumping Up Sequence
- Why was 2^127-1 an interesting problem for "Baby"?
- What does it mean to "burn a zero-day"?
- Can everybody disarm traps?
- Assassination by means of shooting through wall
- What/who is a 'guy with camera' or 'GWC?
- What advantages do students have who learn how to touch type?
- Why not include as a requirement that all functions must be continuous to be differentiable?
- Should I take out a loan to pay off a relative's credit card debt?