7
votes
7
votes
Is there a faster way to compose a large number of random Gaussians?
Basically the idea is to draw in vector form, then exploit FrontEnd's ability to Rasterize the result.
First we make the base primitive corresponding to a "...
7
votes
Is there a faster way to compose a large number of random Gaussians?
You use MapThread with a CompiledFunction. But CompiledFunctions have their own threading ...
6
votes
How to use Compile to optimize the performance of a function calculating the distance between two points?
Karl's answer is perfect as it is. If you know for sure that your input vectors have at least length 3, then it is safe to deactivate the bound checks that Mathematica writes into the C code. This can ...
5
votes
Is there a faster way to compose a large number of random Gaussians?
The 3D Case takes just a few seconds using OpenCL. It was a real pain getting OpenCLLink to work. I also improved the alpha blending.
...
4
votes
How to use Compile to optimize the performance of a function calculating the distance between two points?
[Answer to a different question...]
The compiled methods are fine if, for each point in one set, you only want to check distances to a small number of points in the other set (the examples have "...
4
votes
How to use Compile to optimize the performance of a function calculating the distance between two points?
What follows is a more detailed demonstration of Karl's answer on this page. This demonstrates the performance improvement (amazing, in my opinion) offered by ...
1
vote
How to improve the speed of tables in Mathematica?
At least the timing can be reduced by 1/5 by using functions instead of replacments inside the Table
fff[t_, x_, v1_, v2_] = ff
...
1
vote
Optimization of a Markov сhain with symbolic transition rate
I don't know what you want to do honestly.
if you want everything to be symbolic,how about using characteristic function?
Consider a conditional random walk.
Let's say that if the value of i is ...
1
vote
1
vote
1
vote
1
vote
How to find all the positions of max value of a list efficiently?
Using PositionIndex: (introduced 9th July 2014)
...
1
vote
How to find all the positions of max value of a list efficiently?
Since V 13.2 we have PositionLargest and PositionSmallest
...
1
vote
Better way to test that a matrix is upper-triangular?
Since V 12.0 we have UpperTriangularMatrixQ:
...
1
vote
Counting the population of integers
This has a lot of answers already, but here's an obvious (to me) solution that hasn't been mentioned:
...
1
vote
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
performance-tuning × 2908list-manipulation × 534
matrix × 233
compile × 192
parallelization × 162
numerical-integration × 161
plotting × 149
mathematical-optimization × 131
differential-equations × 126
equation-solving × 125
programming × 109
linear-algebra × 104
numerics × 103
functions × 98
memory × 92
graphs-and-networks × 86
code-review × 78
sparse-arrays × 72
function-construction × 71
image-processing × 67
calculus-and-analysis × 66
probability-or-statistics × 63
graphics × 56
random × 54
combinatorics × 49