MCPcopy Create free account
hub / github.com/antlr/codebuff / mulMod

Method mulMod

output/java_guava/1.4.18/LongMath.java:1170–1179  ·  view source on GitHub ↗
(long a, long b, long m)

Source from the content-addressed store, hash-verified

1168
1169 SMALL {
1170 @Override
1171 long mulMod(long a, long b, long m) {
1172 /*
1173 * NOTE(lowasser, 2015-Feb-12): Benchmarks suggest that changing this to
1174 * UnsignedLongs.remainder and increasing the threshold to 2^32 doesn't pay for itself, and
1175 * adding another enum constant hurts performance further -- I suspect because bimorphic
1176 * implementation is a sweet spot for the JVM.
1177 */
1178 return (a * b) % m;
1179 }
1180
1181 @Override
1182 long squareMod(long a, long m) {

Callers 1

powModMethod · 0.95

Calls 3

times2ToThe32ModMethod · 0.95
remainderMethod · 0.95
plusModMethod · 0.95

Tested by

no test coverage detected