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 ...
xzczd's user avatar
  • 65.9k
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 ...
Domen's user avatar
  • 23.1k
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?...
xzczd's user avatar
  • 65.9k
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 ...
Henrik Schumacher's user avatar
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 ...
Daniel Lichtblau's user avatar
4 votes

Effective use of idle cores when using parallelization

You can join all your "jobs" into one list, then call ParallelMap once. ...
Domen's user avatar
  • 23.1k
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 ...
Henrik Schumacher's user avatar
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. ...
Goofy's user avatar
  • 2,747
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: ...
Vito Vanin's user avatar
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 ...
eldo's user avatar
  • 64.6k
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 ...
Armin Vollmer's user avatar
2 votes

How to efficiently duplicate and rotate a graphics object?

Update: With mirror symmetry ...
azerbajdzan's user avatar
  • 14.4k
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 ...
E. Chan-López's user avatar
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: ...
E. Chan-López's user avatar
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 ...
eldo's user avatar
  • 64.6k
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 ...
Henrik Schumacher's user avatar
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 ...
Rolf Mertig's user avatar
  • 17.2k
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 ...
Henrik Schumacher's user avatar
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:...
Henrik Schumacher's user avatar
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 ...
flinty's user avatar
  • 25k
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: ...
lericr's user avatar
  • 26.8k

Only top scored, non community-wiki answers of a minimum length are eligible