Commit Graph
593 Commits
Author SHA1 Message Date
mlemanczyk 8ea975f2ed DeviceDependentGenerator added to tasks.json. It can now generate the files during VS Code builds. Ignore list updated. 2025-12-18 09:39:56 +01:00
mlemanczyk af7c9491e4 DeviceDependentGenerator can now add suffix to the name of the generated types. 2025-12-18 09:23:41 +01:00
mlemanczyk 9faa397364 DeviceDependentGenerator added. 2025-12-18 07:37:53 +01:00
mlemanczyk 23748ad3d2 MethodImpl attributes added. Unnecessary try...finally blocks removed. 2025-12-18 05:31:27 +01:00
mlemanczyk 2abc6aae49 --mersenne=bydivisor testers and sessions integrated and converted to structs. 2025-12-18 05:07:31 +01:00
mlemanczyk 3c80221105 MontgomeryDivisorDataPool.Rent / .Return removed as we no longer pool Montgomery divisor data. UInt128Extensions.MontgomeryDivisorDataPool variables optimized. 2025-12-16 02:27:29 +01:00
mlemanczyk b7773adad8 PrimeOrderCalculator.ExponentLoweringCpu optimized to reuse factors & exponents span instead of its own buffers 2025-12-15 20:22:03 +01:00
mlemanczyk 566cbc3599 PrimeOrderCalculator.Cpu optimizations. 2025-12-15 17:22:55 +01:00
mlemanczyk 97fd041ec0 Tiny cleanup for improved readability. 2025-12-15 04:37:03 +01:00
mlemanczyk 2c18818ac8 PrimeOrderCalculator.PopulateSmallPrimeFactorsCpu, .ExtractSmallPrimeExponent & ULongExtensions.ReduceCycleRemainder optimized. 2025-12-15 04:36:47 +01:00
mlemanczyk 048d1576ef Tiny cleanup. 2025-12-15 04:33:09 +01:00
mlemanczyk 974b1da873 Small optimizations 2025-12-14 01:35:13 +01:00
mlemanczyk e0daccdc1a BTree fine-tuned. 2025-12-14 00:19:53 +01:00
mlemanczyk bca059c4f2 Initial BTree version implemented. 2025-12-14 00:03:51 +01:00
mlemanczyk e8cca74f68 DeeterministicRandom types optimized. 2025-12-13 16:00:28 +01:00
mlemanczyk 1b3882addc PrimeOrderCalculator.PartialFactorCpu variables optimized. Removed constant parameter from AddFactorToCollector. 2025-12-13 15:36:32 +01:00
mlemanczyk 079b2d5b72 PartialFactorPendingEntry changed back to struct for better performance. 2025-12-13 14:28:01 +01:00
mlemanczyk a185149eba PrimeOrderCalculator.PartiaFactorCpu optimized to use one-time allocation list and stack. 2025-12-13 14:21:37 +01:00
mlemanczyk ec080ade7f PendingEntry renamed to PartialFactorPendingEntry and moved to its own file. PrimeOrderCalculator.PartialFactor partially optimized to use fixed buffers factors & exponents. 2025-12-13 05:11:02 +01:00
mlemanczyk 8fbe248a49 Revert "Reusable buffers introduced."
This reverts commit 39a66fdef1.
2025-12-13 04:17:30 +01:00
mlemanczyk 39a66fdef1 Reusable buffers introduced. 2025-12-13 04:16:05 +01:00
mlemanczyk 8b0d09cc9c Fixed capacity stack improvements to make sure that each thread gets its own instance. 2025-12-12 14:43:49 +01:00
mlemanczyk 15bcde1776 SemaphoreSlim replaced with PollingSemaphore. 2025-12-12 03:41:13 +01:00
mlemanczyk 45c477de5a DefaultThreadPoolCapacity updated to avoid too big arrays without reason. 2025-12-12 00:57:51 +01:00
mlemanczyk 49e47b161d Tiny cleanup. Namespace updated. 2025-12-12 00:56:33 +01:00
mlemanczyk 43376745f5 Benchmarks to compare Interlocked with Atomic added. Atomic replaced with Interlocked on CPU path as better performer. 2025-12-11 23:45:01 +01:00
mlemanczyk 51284be4fb Micro-optimizations and adjustments. 2025-12-11 22:50:47 +01:00
mlemanczyk 8f0cc17d90 PoolingSemaphore optimized. 2025-12-11 21:46:07 +01:00
mlemanczyk 260aa19e44 Pools renamed to FixedCapacityPools. Other fixed capacity collections added. Queues, concurrent queues and standard stacks replaced with fixed capacity stacks. MethodImplOptions.AggressiveInlining and .AggressiveOptimization added to simple methods and getters / setters. Variables optimized in few places. 2025-12-11 21:10:19 +01:00
mlemanczyk 547d43de84 ExponentRemainderStepperCpu local variables optimized. Cache is now driven by manually calculated key to avoid unnecessary allocations. 2025-12-11 05:29:19 +01:00
mlemanczyk 131b3265bc PrimeOrderCalculator.Cpu cleaned up - hybrid & GPU related methods moved to their corresponding files. 2025-12-11 00:00:12 +01:00
mlemanczyk 5df2cc7f9b using cleaned up. 2025-12-10 23:59:04 +01:00
mlemanczyk 05d3061c47 MethodImplOptions.AggressiveOptimization & MethodImplOptions.AggressiveInlining optimized. Small optimizations. 2025-12-10 19:59:51 +01:00
mlemanczyk 7a242b3bfa PrimeOrderCalculator.PartialFactorCpu simplified to work only with spans and throw exception if the number of factors is exceeded. PrimeOrderMode removed in favor of bool flag. 2025-12-10 12:47:25 +01:00
mlemanczyk 72890bf343 Dictionary and List pooling added in PrimeOrderCalculator.Cpu. 2025-12-08 21:03:25 +01:00
mlemanczyk f7dbc017a9 Modulo operators replaced with steppers, where possible. 2025-12-08 20:57:47 +01:00
mlemanczyk 5c91d79927 State saving frequency increased to prevent too many re-calculations during frequent restarts. 2025-12-08 16:35:24 +01:00
mlemanczyk 6e68252279 Status update improvement. 2025-12-08 02:53:27 +01:00
mlemanczyk f1109330df Default no. of accelerators increased back to 298 (max without exceptions). State saving interval decreased to limit unnecessary overhead. 2025-12-08 02:51:04 +01:00
mlemanczyk f76cf05e10 Exception message added to console output. 2025-12-08 02:49:57 +01:00
mlemanczyk d69ad9c64a State saving interval decreased. 2025-12-07 19:17:09 +01:00
mlemanczyk 6887111128 BigInteger-friendly steppers added. MersenneResidueStepper converted to struct. Manual residue tracking replaced with steppers. Modulo operations replaced with steppers. 2025-12-07 19:16:45 +01:00
mlemanczyk 86f20ed083 Support for q > 2^64 added in --mersenne=bydivisor mode 2025-12-05 23:33:21 +01:00
mlemanczyk cf5bd6bc1a PendingEntry.WithPrimality changed to modify the instance instead of creating a new one. 2025-12-05 15:51:16 +01:00
mlemanczyk 928e847f1f AscendingdivisorRemainderStepper used in PrimeTesterByLastDigit 2025-12-05 14:17:24 +01:00
mlemanczyk b3a325521a PrimeTester.IsPrimeCpu will now reuse remainders from previous checks. 2025-12-04 12:39:56 +01:00
mlemanczyk 86192a71b0 Divisor checking optimized to only flag if divisor was found or not without returning complete array of hits. We'll now also track residues for 13, 17 & 19 as the most frequent ones. 2025-12-03 00:57:25 +01:00
mlemanczyk 85a90c70bf --gpu-ration command-line argument added. AscendingDivisorRemainderStepper implemented in PrimeTester.IsPrimeCpu. PrimeOrderCalculator.RunOnCpu adjusted for low GPU ratios to prevent infinite increase of the counter. 2025-12-02 23:36:18 +01:00
mlemanczyk f43c67c86f Tasks will now save calculations progress and resume calculation upon restart. 2025-12-02 00:42:38 +01:00
mlemanczyk 941733905b Hybrid device mode implemented as the current --mersenne=bydivisor CPU execution path. CPU path is now limited to CPU calculations, only. 2025-12-01 03:45:39 +01:00