Skip to content

Commit 740de25

Browse files
committed
Fix benchmark, see #334
1 parent 24ed619 commit 740de25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

path_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ func TestPathLengthParametrization(t *testing.T) {
950950
}
951951

952952
func BenchmarkToRasterizer(b *testing.B) {
953-
res := DPMM(1.0)
953+
res := DPMM(0.5)
954954
data, err := os.ReadFile("resources/netherlands.path")
955955
if err != nil {
956956
panic(err)
@@ -985,7 +985,7 @@ func BenchmarkToRasterizer(b *testing.B) {
985985
}
986986

987987
func BenchmarkToScanx(b *testing.B) {
988-
res := DPMM(1.0)
988+
res := DPMM(0.5)
989989
data, err := os.ReadFile("resources/netherlands.path")
990990
if err != nil {
991991
panic(err)
@@ -1003,7 +1003,7 @@ func BenchmarkToScanx(b *testing.B) {
10031003
scanner := scanx.NewScanner(spanner, int(w), int(h))
10041004

10051005
scanner.SetColor(image.Black)
1006-
p.ToScanx(scanner, h*float64(res), res)
1006+
p.ToScanx(scanner, h, res)
10071007
scanner.Draw()
10081008

10091009
f, _ := os.Create("ToScanx.png")
@@ -1013,7 +1013,7 @@ func BenchmarkToScanx(b *testing.B) {
10131013
b.ResetTimer()
10141014
for i := 0; i < b.N; i++ {
10151015
scanner.Clear()
1016-
p.ToScanx(scanner, h*float64(res), res)
1016+
p.ToScanx(scanner, h, res)
10171017
scanner.Draw()
10181018
}
10191019
}

0 commit comments

Comments
 (0)