Fix bench jpeg and make blends slower.
This commit is contained in:
parent
25964566cf
commit
84e86a8c30
2 changed files with 10 additions and 5 deletions
|
@ -1,8 +1,8 @@
|
||||||
import benchy, chroma, pixie/blends, pixie/images, vmath
|
import benchy, chroma, pixie/blends, pixie/images, vmath
|
||||||
|
|
||||||
let
|
let
|
||||||
backdrop = newImage(256, 256)
|
backdrop = newImage(512, 512)
|
||||||
source = newImage(256, 256)
|
source = newImage(512, 512)
|
||||||
source.fill(rgba(100, 100, 100, 100))
|
source.fill(rgba(100, 100, 100, 100))
|
||||||
|
|
||||||
template reset() =
|
template reset() =
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
import benchy, jpegsuite, pixie/fileformats/jpeg, stb_image/read as stbi, strformat
|
import benchy, jpegsuite, pixie/fileformats/jpeg, stb_image/read as stbi,
|
||||||
|
strformat, os
|
||||||
|
|
||||||
for file in jpegSuiteFiles:
|
for file in jpegSuiteFiles:
|
||||||
let data = readFile(file)
|
let data = readFile(file)
|
||||||
timeIt &"pixie jpeg {(data.len div 1024)}k decode":
|
var name = file.splitPath.tail
|
||||||
|
name.setLen(min(name.len, 22))
|
||||||
|
timeIt &"pixie {name} decode":
|
||||||
discard decodeJpeg(data)
|
discard decodeJpeg(data)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
for file in jpegSuiteFiles:
|
for file in jpegSuiteFiles:
|
||||||
let data = readFile(file)
|
let data = readFile(file)
|
||||||
timeIt &"stb_image jpeg {(data.len div 1024)}k decode":
|
var name = file.splitPath.tail
|
||||||
|
name.setLen(min(name.len, 22))
|
||||||
|
timeIt &"stb {name} decode":
|
||||||
var width, height, channels: int
|
var width, height, channels: int
|
||||||
discard loadFromMemory(
|
discard loadFromMemory(
|
||||||
cast[seq[byte]](data),
|
cast[seq[byte]](data),
|
||||||
|
|
Loading…
Reference in a new issue