Extension methods benchmarked. Slower alternatives replaced.
This commit is contained in:
1 parent
9becb8df67
commit
6e99ee39e3
40 files changed
+930
-1026
No files matched your search
@@ -53,7 +53,7 @@ public sealed class PrimeTester(bool useInternal = false)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
else if (n > 5UL && n.Mod5() == 0UL)
|
||||
else if (n > 5UL && (n % 5UL) == 0UL)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ public sealed class PrimeTester(bool useInternal = false)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((n & 1UL) == 0UL || (n > 5UL && n.Mod5() == 0UL))
|
||||
if ((n & 1UL) == 0UL || (n > 5UL && (n % 5UL) == 0UL))
|
||||
{
|
||||
results[index] = 0;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user