[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61129] Improve performance of factor() functi
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #61129] Improve performance of factor() function |
Date: |
Tue, 5 Oct 2021 05:18:36 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 |
Update of bug #61129 (project octave):
Status: Patch Submitted => Patch Reviewed
Summary: Performance of factor(). Proposed patch attached. =>
Improve performance of factor() function
_______________________________________________________
Follow-up Comment #17:
Thank you for the important hint @mleitner. This announcement would indeed be
disappointing in many cases. See additional tests below.
Final modified reviewed patch (file #52034) for pushing tomorrow.
Large prime with 19 digits 2305843009213693951
https://en.wikipedia.org/wiki/Mersenne_prime#List_of_known_Mersenne_primes
Single large prime:
>> x = [uint64(230584300921369) * 10000 + 3951];
>> tic, factor (x), t1 = toc
ans = 2305843009213693951
t1 = 49.933
>> tic, factor6 (x), t2 = toc
ans = 2305843009213693951
t2 = 11.059
>> t1 / t2
ans = 4.5153
Three large primes:
>> x = uint64 (8191) * 524287 * 2147483647
x = 9222228542614937599
>> tic, factor (x), t1 = toc
ans =
8191 524287 2147483647
t1 = 103.96
>> tic, factor6 (x), t2 = toc
ans =
8191 524287 2147483647
t2 = 22.123
>> t1 / t2
ans = 4.6992
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61129>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61129] Performance of factor(). Proposed patch attached., Kai Torben Ohlhus, 2021/10/04
- [Octave-bug-tracker] [bug #61129] Performance of factor(). Proposed patch attached., Kai Torben Ohlhus, 2021/10/04
- [Octave-bug-tracker] [bug #61129] Performance of factor(). Proposed patch attached., anonymous, 2021/10/04
- [Octave-bug-tracker] [bug #61129] Performance of factor(). Proposed patch attached., Michael Leitner, 2021/10/04
- [Octave-bug-tracker] [bug #61129] Performance of factor(). Proposed patch attached., Kai Torben Ohlhus, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function,
Kai Torben Ohlhus <=
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Michael Leitner, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, anonymous, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Michael Leitner, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, anonymous, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Kai Torben Ohlhus, 2021/10/05
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Arun Giridhar, 2021/10/06
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Kai Torben Ohlhus, 2021/10/06
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Arun Giridhar, 2021/10/07
- [Octave-bug-tracker] [bug #61129] Improve performance of factor() function, Kai Torben Ohlhus, 2021/10/12