Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Benchmarks/RlweBenchmark/RlweBenchmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,19 @@ func ciphertextMultiplyBenchmark<Scheme: HeScheme>(_: Scheme.Type) -> () -> Void
}
}

func ciphertextMultiplyInversePowerOfXBenchmark<Scheme: HeScheme>(_: Scheme.Type) -> () -> Void {
{
benchmark("CiphertextMultiplyInversePowerOfX", Scheme.self) { benchmark in
let benchmarkContext: RlweBenchmarkContext<Scheme> = try StaticRlweBenchmarkContext.getBenchmarkContext()
benchmark.startMeasurement()
var ciphertext = try benchmarkContext.ciphertext.convertToCoeffFormat()
for _ in benchmark.scaledIterations {
try blackHole(ciphertext.multiplyInversePowerOfX(power: ciphertext.context.degree / 2))
}
}
}
}

func ciphertextRelinearizeBenchmark<Scheme: HeScheme>(_: Scheme.Type) -> () -> Void {
{
benchmark("CiphertextRelinearize", Scheme.self) { benchmark in
Expand Down Expand Up @@ -665,6 +678,9 @@ nonisolated(unsafe) let benchmarks: () -> Void = {
ciphertextSubtractBenchmark(Bfv<UInt32>.self)()
ciphertextSubtractBenchmark(Bfv<UInt64>.self)()

ciphertextMultiplyInversePowerOfXBenchmark(Bfv<UInt32>.self)()
ciphertextMultiplyInversePowerOfXBenchmark(Bfv<UInt64>.self)()

ciphertextMultiplyBenchmark(Bfv<UInt32>.self)()
ciphertextMultiplyBenchmark(Bfv<UInt64>.self)()

Expand Down