spread benchmarks

This commit is contained in:
Ryan Oldenburg 2021-06-19 15:06:50 -05:00
parent 0fa2a9fe6b
commit a33fcd9132

View file

@ -33,5 +33,31 @@ timeIt "ceil":
reset()
timeIt "spread":
block spread_1:
var p: Path
p.rect(500, 500, 500, 500)
timeIt "spread_1":
mask.fill(0)
mask.fillPath(p)
mask.spread(10)
block spread_2:
var p: Path
p.rect(500, 500, 1000, 1000)
timeIt "spread_2":
mask.fill(0)
mask.fillPath(p)
mask.spread(10)
block spread_3:
timeIt "spread_3":
mask.fill(255)
mask.spread(10)
block spread_4:
timeIt "spread_4":
mask.fill(0)
mask.setValueUnsafe(1000, 1000, 255)
mask.spread(10)