Linked Questions

11
votes
2answers
1k views

Dynamic Programming with delayed evaluation

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
8
votes
2answers
583 views

Why won't this compiled function be inlined?

I've been trying to use Compile to get some code to execute more quickly, because I will need to call it millions of times. I've been using the ...
6
votes
2answers
161 views

Achieve performance that is competitive with numpy [duplicate]

What are the best practices to ameliorate time performance of Mathematica? As a practical example how we can decrease timing below? ...
5
votes
2answers
252 views

ParallelMemberQ

I tried to make a parallel version of MemberQ for use with a large list, but failed miserably in terms of performance. I used Partition to subdivide the list and ParallelMap to perform the MemberQ ...
2
votes
6answers
484 views

Color points in list plot based on whether they satisfy an equation

I wanted to create a set of points (a,b) such that a, b are both integers between -6 and 6. Then I want to color all points (a,b) that satisfy $|a-b|\ge2$ red, and all the remaining points blue. I ...
4
votes
2answers
310 views

EventHandler and Refresh rate

Based on the example of the Documentation of MousePosition, Properties and Relations, here is my test code using "MouseDragged" instead of "MouseClicked": ...
5
votes
2answers
229 views

Mathematica taking forever to compute

I want to simulate the fresnel diffraction through circular aperture.But mathematica is taking forever to calculate.Here is my code. ...
1
vote
3answers
302 views

professionalize/optimize my code that calls a function

I have the following construction, which defines a function that I subsequently call in a loop multiple times. I use this very often, but I have never looked into if there is a more professional way ...
4
votes
1answer
354 views

Sample of the random times at which the random walk crosses the boundary

I defined a security boundary for a random walk: ...
2
votes
3answers
323 views

Random Geometric Graphs, but fast

I am optimising the random geometric graph generation ideas in this post. I need to generate a large number of random geometric graphs with probabilistic connectivity (soft random geometric graphs), ...
2
votes
1answer
563 views

Understanding execution time in nested loops

I have the following simple code ...
5
votes
2answers
150 views

A box structure with a depth exceeding the maximum allowed depth was encountered

I am trying to perform the task in Mark McClure's article Parametric L-Systems and borderline fractals. I have copied his opening code on the first three pages: ...
4
votes
2answers
606 views

Collatz Tool Box — any speed ups possible?

I have created a tool box for experimenting with the Collatz conjecture. Info here: Wolfram MathWorld and here: Wikipedia The patterns I have found allow us to make the conjecture jump through some ...
3
votes
1answer
702 views

How to estimate the running time of a programme on mathematica [closed]

I am solving a system of 6 linear equations containing six unknowns using mathematica. It is taking too much time and still running after 3 hours. can I estimate the approximate running time? Is there ...
4
votes
0answers
561 views

Understanding performance: graph connected components

I need to analyze directed graphs with 10M edges, 1M vertices, and 300K strongly connected components, so that the largest one contains 400K vertices. I read some explanations of Leonid Shifrin here, ...

15 30 50 per page