Linked Questions

1
vote
1answer
243 views

How should I go about writing more functional and list based code? [duplicate]

I've heard that Mathematica is usually faster when the code is list-based and/or uses a functional paradigm. I'm still working on getting the hang of this; there are a lot of ...
0
votes
1answer
89 views

How can I improve performance of my simulation code?

1) Generate nNsamples from beta distribution (a, b) and the parameter of wighted c ...
3
votes
1answer
97 views

Access to the temporary solution in NDSolve with StepMonitor

I want to step-monitor at each time step of a spatio-temporal NDSolve (using the finite element method) the maximum bending of the function sampled over the curent mesh. For this I first need access ...
2
votes
1answer
95 views

Code optimizations with functions inside Module

I wrote a small code by using functions inside Module: ...
0
votes
0answers
226 views

Using Table[ ] vs using Do[Append [ ] ] [duplicate]

Is it generally better/faster to use the Table function over using Do[Append []]? For example, I have this piece of code: <...
0
votes
0answers
108 views

Performance tuning with memoisation, compilation and vectorization - further possibilities?

In order to tune the performance of noticeably slow code of mine, I had a look at many different excellent posts on this topic here on M.SE, e.g. here to name the most interesting one. Now I ask ...
1
vote
1answer
79 views

Compilation without MainEvaluate

I'm trying to avoid MainEvaluate in CompiledFunction. I've tried below but I couldn't get rid of it. I'd appreciate any help!! Here f1 and f2 will be rank 1 list with real type. ...
3
votes
0answers
92 views

How to make reading from long lists faster?

Background I am using Mathematica to solve a traveling-salesman-like problem. I implemented two different algorithms that are able to solve this type of problem and both algorithms yield the same ...
1
vote
0answers
89 views

Mathematica using all available cores, but not speeding up calculation as much as expected

This is a follow-up question to my previously posted question on how to get Mathematica to use all available cores to do a parallel calculation. I resolved this by rewriting the code in terms of a <...
0
votes
0answers
82 views

averaging over large number of random realizations

I want to run following for few hundreds of a random variable set. This calculates: generate normal random variable find gain with squaring calculate performance metric find ...
3
votes
0answers
80 views

Where can I find detailed information about the SystemOptions?

I'm looking to optimize my Mathematica script, and I'm willing to go spelunking with low-level system options. The problem is that I've been looking in the Mathematica documentation, but there doesn'...

15 30 50 per page