That sounds right: quadratic to fill the array of multiples and then the loop over all the candidates to see if any occur within that list of multiples.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
79 Languages speed competition: Can we make Fortran win?
|
43 | 4309 | January 15, 2023 | |
Compile-time computation example now works with LFortran | 2 | 413 | June 4, 2024 | |
Why is my code compiled with GFortran on Windows slower than on Ubuntu?
|
51 | 5745 | May 3, 2022 | |
Compile-time unit checking in Fortran: some practical experiences
|
8 | 342 | August 19, 2024 | |
Compilation time vs. C++ | 22 | 1772 | January 10, 2022 |