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

Method mulMod

output/java_guava/1.4.19/LongMath.java:1151–1160  ·  view source on GitHub ↗
(long a, long b, long m)

Source from the content-addressed store, hash-verified

1149
1150 SMALL {
1151 @Override
1152 long mulMod(long a, long b, long m) {
1153 /*
1154 * NOTE(lowasser, 2015-Feb-12): Benchmarks suggest that changing this to
1155 * UnsignedLongs.remainder and increasing the threshold to 2^32 doesn't pay for itself, and
1156 * adding another enum constant hurts performance further -- I suspect because bimorphic
1157 * implementation is a sweet spot for the JVM.
1158 */
1159 return (a * b) % m;
1160 }
1161
1162 @Override
1163 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