Questions tagged [timing]
This Tag is used for two things: Questions regarding improving execution speed and questions where various methods are compared for execution speed.
146 questions
3
votes
0
answers
135
views
Timing inside a compiled function?
I want to have multiple timings inside a compiled code. However, it turns our that AbsoluteTime[] does not work:
...
5
votes
0
answers
740
views
Benchmarking USM Transform #3 vs. Mathematica’s Integrate
I’ve put together a small benchmark (results available in this notebook) comparing Mathematica’s built‑in Integrate against a USM implementation based on ...
0
votes
0
answers
92
views
How can I parallelize the function evaluation in ComplexPlot?
I'm trying to visualize a function that's relatively expensive to compute with ComplexPlot.
This strikes me as an "embarrassingly parallel" task, the kind that is so trivial to parallelize ...
0
votes
1
answer
72
views
Setting shared function values in parallel is running sequentially
I am trying to define a function whose values can be updated across different Kernels running in parallel, where each Kernel might have to use values defined by other Kernels previously in the process....
0
votes
0
answers
122
views
Can this loop / code be optimized to find more items in the sequence?
I am looking at the code snippet for OEIS A067075.
Do[k = 1; While[Plus @@ IntegerDigits[k^3] != n^3, k++]; Print[k], {n, 1, 6}]
It does okay for the first ...
2
votes
0
answers
105
views
Stop NSolve after a certain amount of time and return calculated solutions
I am trying to solve a system of equations of the form:
...
2
votes
0
answers
112
views
Why TimeConstrained does not work when increasing the time?
I found a case where in V 14.4 TimeConstrained hangs when increasing the time from 60 seconds to 120 seconds.
This happens only in V 14.0. Same exact code works in ...
2
votes
0
answers
106
views
Abnormally long computation time using AppellF1 function
I am trying to use the AppellF1 function in Mathematica 13.3.1 on an Ubuntu machine with an i7 13700. The inbuilt function seems to be much slower in some cases ...
0
votes
0
answers
137
views
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 ...
1
vote
1
answer
249
views
Creating and printing a real-time evaluation timer
I want to print a timer that starts at 0 when an evaluation begins and stops when the evaluation is completed. I have come up with the following solution using Clock...
2
votes
1
answer
155
views
CPU time in iteration process
Let $Tx=\frac{x}{2}$ for all $x\in[0,1]$. Let $x_{0}\in[0,1]$ and set an iterative sequence $\{x_{n}\}$ by the method $x_{n+1}=Tx_{n}$. Now if $x_{0}=0.8$, then I get a convergent sequence towards the ...
3
votes
2
answers
178
views
Position command runs much slower for range containing numerically evaluated Bessel function
I have a long list (about 10000) of positive numbers (here simply denoted list), for which I want to find the positions of elements lying between 0.5 and the first ...
14
votes
3
answers
622
views
Why does Module slow down StringMatchQ by 180 times?
I knew that Module is slower than With or Block, often by several times. But it surprises me ...
3
votes
1
answer
103
views
Inconsistent Timing on FinancialBond valuations
I need to do bond valuations (lots of them across lots of data) using FinancialBond.
Context & Background
I have daily interest rate data on 30 year US Treasury ...
1
vote
1
answer
281
views
How do I speed up this numerical integration with Bessel functions? (Tried changing Working Precision and Integration Strategies)
I need to compute the function P[b] given as follows:
...