Linked Questions

1 vote
3 answers

Fastest way to find roots

I'm working with generative polynomials, and would like to know if there is a faster way to calculate roots. Using the technique below I've managed to cut the time down significantly. However at n=35, ...
Daniel's user avatar
  • 115
26 votes
2 answers

Measuring execution time of code

How one can measure the execution time (time that is spent for code to finish) of a program in Mathematica? I understand that there are general timing functions (Timing, AbsoluteTiming, TimeUsed, etc....
sky-light's user avatar
  • 827
20 votes
2 answers

Incorrect Timing of Total

For demonstrating how fast C-compiled functions can be, in one of my courses I use the following function for finding the sum of a list of reals: ...
Fred Simons's user avatar
  • 10.2k
7 votes
2 answers

How to select the fastest approach for large numerical data computations?

I really love the flexibility of Mathematica: there are several ways to perform one task. However, to get the performance of the intense numeric calculation, it can ...
Nam Nguyen's user avatar
  • 1,761
3 votes
2 answers

NIntegrate timing discrepancy

When I run the following identical numerical integrals ...
Chris's user avatar
  • 1,043
58 votes
1 answer

Why won't Parallelize speed up my code?

What reasons are there that can cause parallelized Mathematica code not to run with full performance?
Szabolcs's user avatar
  • 236k
18 votes
1 answer

Why Function is not identical to `&` in autocompilation?

Here is the example, copied from here square = Function[x, x^2]; square1 = #^2 &; the timing and unpacking status shows ...
matheorem's user avatar
  • 17.2k
2 votes
1 answer

Why the "Sum" function becomes extremely slow at a specific size of matrix? How to AVOID it? [duplicate]

Three methods("Sum", "Total@Table" and "Do") have been used to do the same work. The "Sum" and "Total@Table" function becomes extremely slow at num=...
SongSun's user avatar
  • 97
1 vote
1 answer

How to make that interpolation?

I have the following dataset: SetDirectory[NotebookDirectory[]]; TableSpectrum = Import["spectrum.dat", "Table"]; I want to make the interpolation. However, when ...
John Taylor's user avatar
  • 5,887
1 vote
1 answer

Why do I keep getting the same time from the Timing function?

I am running a gamblers problem solution where I am testing the timing involved in solving the Ax = b equation for matrices of n=100, 1000, 10000, and 100000. For some reason I keep getting the same ...
Jaigus's user avatar
  • 257
1 vote
1 answer

Why, according to Timing, is this code so FAST?

Obviously (?) I have a problem with precision or something but MMA seems to be able to take the mean squared of a 1e7 long series of random reals in literally no time, unless I use RepeatedTiming ...
Julian Moore's user avatar
  • 2,560
6 votes
0 answers

Difference between Timing, AbsoluteTiming, and Elapsed?

In the picture below, Difference between Timing, AbsoluteTiming, Time and ...
Milk's user avatar
  • 1,748
0 votes
0 answers

Can we explain why Timing is inconsistent?

I am trying to speed up a code and by placing Timing statements in the code I identified a suspect calculation that I do repeatedly. In order to test out the ...
Hugh's user avatar
  • 16.6k
0 votes
0 answers

What could cause Timing to report erroneously? [duplicate]

I am using Timing to measure the time it takes to load a ".dat" file and the reported time (4.47 seconds) is waaaay below the real time (measured using a stopwatch ...
Benjamin Márkus's user avatar
0 votes
0 answers

strange timing behavior

The following code is from a book about Mathematica. ...
Dimitris's user avatar
  • 4,864

15 30 50 per page