Replies: 5 comments 9 replies
-
There are already a lot of known opportunities to optimize the performance of Currently (this year), the .NET team is focusing on more prioritized tasks and doesn't have enough capacity to do major involvement for |
Beta Was this translation helpful? Give feedback.
-
what is |
Beta Was this translation helpful? Give feedback.
-
Hi kzrnm,
Sorry, the 1 billionth Fibonacci number.
Result = Fibonacci((ulong)1<<30);
Takes 417 seconds with BitInt, verses 1500+ with BigInteger. It was just a way to test and baseline performance. Fibonacci has a mix of add, sub, shift and mul.
|
Beta Was this translation helpful? Give feedback.
-
All code, testing and measurement is supplied in...
https://github.com/tecel007/BigInt
As to, "How reliable the results are...", you can't be surprised that a highly optimised 64-bit, multithreaded implementation pwned 32-bit code and 1 thread?
|
Beta Was this translation helpful? Give feedback.
-
Hi @tannergooding, I updated my repo with performance metrics and even a graph I think the results suggest
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I developed my own "BigInt" which outperforms BigInteger by a factor of 3 x when calculating Fibonacci(1073741824)
https://github.com/tecel007/BigInt
This performance advantage continues to increase as size grows due to threading.
I think it is way better and more elegant than all that "BigIntegerBuilder" stuff... ALSO, it should be obvious to anyone with low level computer architecture knowledge, that a 64-bit implementation, using a native 2's complement buffer will always outperform a combination of signs, bits and what_ever_the_hell BigIntegerBuilder is. Is there someone at MSFT that can look into this?
I don't have time to integrate and merge 🙁
Beta Was this translation helpful? Give feedback.
All reactions