Skip to content

Commit

Permalink
fix: small perf issue in non accellerated case with useless allocs
Browse files Browse the repository at this point in the history
  • Loading branch information
gbotrel committed Jan 14, 2025
1 parent 29a9616 commit 987d0dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions ecc/bls12-377/fr/sis/sis.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions field/generator/internal/templates/sis/sis.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,8 @@ func NewRSis(seed int64, logTwoDegree, logTwoBound, maxNbElementsToHash int) (*R
partialFFT_64[mask](k, twiddlesCoset)
}
} else {
cosetTable, err := r.Domain.CosetTable()
if err != nil {
return nil, err
}

r.smallFFT = func(k {{ .FF }}.Vector, _ uint64) {
k.Mul(k, {{.FF}}.Vector(cosetTable))
r.Domain.FFT(k, fft.DIF)
r.smallFFT = func(k fr.Vector, _ uint64) {
r.Domain.FFT(k, fft.DIF, fft.OnCoset(), fft.WithNbTasks(1))
}
}
{{- end}}
Expand Down

0 comments on commit 987d0dd

Please sign in to comment.