I kindly ask you if you can give me some useful suggestions to speed up my program written in Wolfram language.
For this purpose, some premises are necessary.
The authors of the article in question use Matlab in their calculations.
I reproduced figures 2, 3, 4, 5, 6, 7,8 and 9 of their article with Mathematica 12.3, and in doing so I noticed some errors in the original text that led the authors to perform a Preprint Rev1. pdf June 8, 2021 (see final quote in the Acknowledgments).
I have found that in these graphs for the tracing of Clothoid the numerical calculation of the function d (Deltafi) = d12 is fundamental, the meaning of which is well described in relations (14) and (15) reported on pages 9 ÷ 10 of the aforementioned article. Figure 5 shows an example of the graphic representation of this function.
Now I correctly reproduce fig. 5 with N = 10,000 but with unacceptable processing time (8.76 h) while the authors take only a few seconds, always with N = 10,000 points. They sent me their Matlab code "Programa que pinta la function d (Delta phi)" see the attachment "Plot function d.rtf".
Can you give me some suggestions / optimization corrections of my Mathematica code in order to speed up this numerical calculation and break it down, if possible, to a few seconds of processing as they do with Matlab?
PS: I am attaching my notebook in fig. 5, with (N = 1,000, t = 178 s) and with (N = 10,000, t = 8.76h)
Sincerely and thanks,
Loris Lori
Attachments: