BigIntBenchmarks. Rollback to gradle 6.8.3 because incompatibility with benchmarks
This commit is contained in:
parent
ba3c9b6d45
commit
1d1937405d
@ -10,23 +10,27 @@ import space.kscience.kmath.operations.invoke
|
||||
|
||||
@State(Scope.Benchmark)
|
||||
internal class BigIntBenchmark {
|
||||
|
||||
val kmNumber = BigIntField.number(Int.MAX_VALUE)
|
||||
val jvmNumber = JBigIntegerField.number(Int.MAX_VALUE)
|
||||
|
||||
@Benchmark
|
||||
fun kmAdd(blackhole: Blackhole) = BigIntField{
|
||||
blackhole.consume(one + number(Int.MAX_VALUE))
|
||||
blackhole.consume(kmNumber + kmNumber + kmNumber)
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
fun jvmAdd(blackhole: Blackhole) = JBigIntegerField{
|
||||
blackhole.consume(one + number(Int.MAX_VALUE))
|
||||
blackhole.consume(jvmNumber + jvmNumber+ jvmNumber)
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
fun kmMultiply(blackhole: Blackhole) = BigIntField{
|
||||
blackhole.consume(number(Int.MAX_VALUE)* number(Int.MAX_VALUE))
|
||||
blackhole.consume(kmNumber*kmNumber*kmNumber)
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
fun jvmMultiply(blackhole: Blackhole) = JBigIntegerField{
|
||||
blackhole.consume(number(Int.MAX_VALUE)* number(Int.MAX_VALUE))
|
||||
blackhole.consume(jvmNumber*jvmNumber*jvmNumber)
|
||||
}
|
||||
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1,5 +1,6 @@
|
||||
package kaceince.kmath.real
|
||||
|
||||
import space.kscience.kmath.misc.UnstableKMathAPI
|
||||
import space.kscience.kmath.real.DoubleVector
|
||||
import space.kscience.kmath.real.minus
|
||||
import space.kscience.kmath.real.norm
|
||||
@ -8,6 +9,7 @@ import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@UnstableKMathAPI
|
||||
class GridTest {
|
||||
@Test
|
||||
fun testStepGrid() {
|
||||
|
@ -71,7 +71,7 @@ internal class MultivariateHistogramTest {
|
||||
assertTrue {
|
||||
res.bins.count() >= histogram1.bins.count()
|
||||
}
|
||||
assertEquals(0.0, res.bins.sumByDouble { it.value.toDouble() })
|
||||
assertEquals(0.0, res.bins.sumOf { it.value.toDouble() })
|
||||
}
|
||||
}
|
||||
}
|
@ -1,27 +1,13 @@
|
||||
public final class space/kscience/kmath/viktor/ViktorBuffer : space/kscience/kmath/structures/MutableBuffer {
|
||||
public static final synthetic fun box-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lspace/kscience/kmath/viktor/ViktorBuffer;
|
||||
public static fun constructor-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
public fun <init> (Lorg/jetbrains/bio/viktor/F64FlatArray;)V
|
||||
public fun copy ()Lspace/kscience/kmath/structures/MutableBuffer;
|
||||
public static fun copy-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lspace/kscience/kmath/structures/MutableBuffer;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;Ljava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (Lorg/jetbrains/bio/viktor/F64FlatArray;Lorg/jetbrains/bio/viktor/F64FlatArray;)Z
|
||||
public fun get (I)Ljava/lang/Double;
|
||||
public synthetic fun get (I)Ljava/lang/Object;
|
||||
public static fun get-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;I)Ljava/lang/Double;
|
||||
public final fun getFlatArray ()Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
public fun getSize ()I
|
||||
public static fun getSize-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)I
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)I
|
||||
public fun iterator ()Ljava/util/Iterator;
|
||||
public static fun iterator-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Ljava/util/Iterator;
|
||||
public fun set (ID)V
|
||||
public synthetic fun set (ILjava/lang/Object;)V
|
||||
public static fun set-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;ID)V
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
}
|
||||
|
||||
public final class space/kscience/kmath/viktor/ViktorFieldND : space/kscience/kmath/nd/FieldND, space/kscience/kmath/operations/ExtendedField, space/kscience/kmath/operations/NumbersAddOperations, space/kscience/kmath/operations/ScaleOperations {
|
||||
|
@ -39,5 +39,5 @@ include(
|
||||
":kmath-ast",
|
||||
":kmath-ejml",
|
||||
":kmath-kotlingrad",
|
||||
":examples",
|
||||
":examples"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user