Skip to content

Commit

Permalink
Merge pull request #151 from SiaFoundation/nate/vzeroupper
Browse files Browse the repository at this point in the history
Increase sector root performance
  • Loading branch information
lukechampine committed Apr 4, 2024
2 parents 1ae0547 + 69d6da0 commit f424825
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/blake2b/blake2b_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -1643,4 +1643,6 @@ TEXT ·hashBlocksAVX2(SB), NOSPLIT, $320-24
VMOVDQU Y1, 32(CX)
VMOVDQU Y2, 64(CX)
VMOVDQU Y3, 96(CX)
// Clear the upper YMM registers to avoid performance penalties
VZEROUPPER
RET
2 changes: 2 additions & 0 deletions internal/blake2b/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ func genHashBlocksAVX2() {
}
}

Comment("Clear the upper YMM registers to avoid performance penalties")
VZEROUPPER()
RET()
}

Expand Down

0 comments on commit f424825

Please sign in to comment.