7
votes
Compile does not boost the speed
Well, it's a bit sad to see that OP seems to have learned nothing from my answer to his previous question. Please remember Compile is advanced tool and it's not ...
6
votes
List of built-in functions written in Wolfram Language
I think your approach of "avoiding" certain functions will not really help you, and you should optimize your code performance in a more targeted, case-by-case manner.
However, to answer your ...
6
votes
How can we improve performance when passing data to a function?
Unless you're doing really high-level evaluation that cannot be Compiled, forget about parallelization. For more info see
Why won't Parallelize speed up my code?...
5
votes
Speed up sparse Hermitian matrix-vector product
If you happen have to multiply many vectors at once with the same matrix H, then place them as columns into a dense matrix. Afterwards do a single maxrix-matrix ...
4
votes
Accepted
How to speed up the following algorithm?
If the weights are based on pairs rather than separably based on individual elements, you can take a random sample of the full set of pairs by weights and sequentially remove each that has an element ...
4
votes
Effective use of idle cores when using parallelization
You can join all your "jobs" into one list, then call ParallelMap once.
...
3
votes
Efficient way of creating matrices from a very large array while avoiding singular values
From the comments I read that you actually only need to sum over all entries of a matrix like
A = Table[f[i-j], {i, 1,n}, {j, 1, n}]
That is, you actually mean to ...
3
votes
Is it possible to pass by reference at the system level?
Maybe you could use BLAS, which tends to do in-place operations.
...
3
votes
Accepted
Fastest splitter?
PositionIndex[ ] seems to take half of the time of GatherBy[ ]. I use the the test case provided, but evaluate the time with GatherBy[ ], after the comment by MarcoB:
...
3
votes
Partitioning a list based on a criterion for sublists
list = {5, 10, 3, 8, 9, 8, 8, 4, 1, 7};
A variant of rhermans SequenceSplit using ...
3
votes
Analog of monitor which does not lead to freezes of the interface
Yes, Andreas's answer is a good and nifty option, but this ressource function also does the job (in many practical cases, I guess):
MonitorProgress - Monitor the progress of a computation and display ...
2
votes
2
votes
Partitioning a list based on a criterion for sublists
list = {5, 10, 3, 8, 9, 8, 8, 4, 1, 7};
A variant of rhermans SequenceSplit using ...
2
votes
How to create a function that merges the first $n$-digits of each value in a list?
A = {1231, 1232, 1233, 1241, 1236};
Using TakeDrop:
...
2
votes
How to create a function that merges the first $n$-digits of each value in a list?
list = {1231, 1232, 1233, 1241, 236, 5};
Using string-functions
...
2
votes
How to group elements of a tuple into groups of 6 elements each?
My approach is to define a function equivalenceClass that takes a given tuple and maps it to its full equivalence class and then use ...
2
votes
Compile does not boost the speed
Just launching the parallel Kernels can take a few seconds.
Putting
Once @ LaunchKernels[];
on top and just adding an N@ operation in your ...
2
votes
How to speed up the following algorithm?
Random as in "each result should be equally likely"? Then you could sample a random subset of length 2 n with ...
1
vote
Speed up sparse Hermitian matrix-vector product
Wow, I just stumbled over something that I cannot explain. Please try to create the matrix H in the following way (note the explicit mention of the background value:...
1
vote
How to improve code speed for the large datasets?
For more performance on the CPU you may have to look into calling into an external library or using Mathematica's compilation tools.
But if you have OpenCLLink set up and a GPU installed, here's this ...
1
vote
How to select non-repeating pair of numbers?
If you want n/2 disjoint pairs of integers taken from the list Range[n], then you can do this:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
performance-tuning × 2956list-manipulation × 543
matrix × 237
compile × 198
parallelization × 165
numerical-integration × 163
plotting × 150
mathematical-optimization × 138
differential-equations × 129
equation-solving × 127
programming × 110
numerics × 107
linear-algebra × 107
functions × 100
memory × 92
graphs-and-networks × 86
code-review × 78
sparse-arrays × 73
function-construction × 71
calculus-and-analysis × 70
image-processing × 67
probability-or-statistics × 63
graphics × 57
random × 55
combinatorics × 50