Skip to content
Open
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
6 changes: 4 additions & 2 deletions src/math/big/arith_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ func testShiftFunc(t *testing.T, f func(z, x []Word, s uint) Word, a argVU) {
// save a.d for error message, or it will be overwritten.
b := make([]Word, len(a.d))
copy(b, a.d)
z := a.d[a.zp : a.zp+a.l]
x := a.d[a.xp : a.xp+a.l]
z:=make([]Word,a.l)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认新的操作不会造成性能损失,影响测试结果

copy(z,a.d[a.zp : a.zp+a.l])
x:=make([]Word,a.l)
copy(x,a.d[a.xp : a.xp+a.l])
c := f(z, x, a.s)
for i, zi := range z {
if zi != a.r[i] {
Expand Down