mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Add PUFFS_USE_NO_OP_PERFORMANCE_HACKS.
name old speed new speed delta puffs_adler32_10k/gcc 3.26GB/s ± 0% 3.26GB/s ± 0% ~ (p=0.222 n=5+5) puffs_adler32_100k/gcc 3.27GB/s ± 0% 3.27GB/s ± 0% -0.12% (p=0.032 n=5+5) puffs_flate_decode_1k/gcc 108MB/s ± 0% 108MB/s ± 0% ~ (p=0.841 n=5+5) puffs_flate_decode_10k/gcc 128MB/s ± 0% 128MB/s ± 0% ~ (p=0.057 n=4+4) puffs_flate_decode_100k/gcc 136MB/s ± 0% 136MB/s ± 0% ~ (p=0.222 n=5+5) puffs_zlib_decode_10k/gcc 123MB/s ± 0% 123MB/s ± 0% ~ (p=0.730 n=5+4) puffs_zlib_decode_100k/gcc 130MB/s ± 0% 131MB/s ± 0% ~ (p=1.000 n=5+5) puffs_gif_lzw_decode_20k/gcc 137MB/s ± 4% 140MB/s ± 3% ~ (p=0.095 n=5+5) puffs_gif_lzw_decode_100k/gcc 177MB/s ± 3% 187MB/s ± 2% +5.75% (p=0.008 n=5+5) puffs_gif_decode_1k/gcc 348MB/s ± 0% 401MB/s ± 1% +15.34% (p=0.016 n=4+5) puffs_gif_decode_10k/gcc 121MB/s ± 5% 154MB/s ± 1% +27.90% (p=0.008 n=5+5) puffs_gif_decode_100k/gcc 106MB/s ± 4% 131MB/s ± 2% +24.35% (p=0.008 n=5+5) puffs_gif_decode_1000k/gcc 109MB/s ± 2% 135MB/s ± 1% +24.03% (p=0.008 n=5+5)
This commit is contained in:
1 parent
4b572702f9
commit
ed6ce6fd54
9 files changed
+232
-9
No files matched your search
@@ -101,6 +101,15 @@ func (g *gen) writeLoadDerivedVar(b *buffer, name t.ID, typ *a.TypeExpr, header
|
||||
b.printf("%srptr_%s = %s%s.buf->ptr + %s%s.buf->ri;",
|
||||
bPrefix, nameStr, aPrefix, nameStr, aPrefix, nameStr)
|
||||
b.printf("uint64_t len = %s%s.buf->wi - %s%s.buf->ri;", aPrefix, nameStr, aPrefix, nameStr)
|
||||
|
||||
if s := noOpPerformanceHacks[nophKey{
|
||||
gCurrFunkCName: g.currFunk.cName,
|
||||
genMethod: "writeLoadDerivedVar",
|
||||
headerFooter: header,
|
||||
}]; s != "" {
|
||||
b.writes(s)
|
||||
}
|
||||
|
||||
b.printf("%srend_%s = %srptr_%s + len;", bPrefix, nameStr, bPrefix, nameStr)
|
||||
b.printf("if (%s%s.private_impl.limit && (%srend_%s > %s%s.private_impl.limit)) {"+
|
||||
" %srend_%s = %s%s.private_impl.limit; }",
|
||||
@@ -153,6 +162,14 @@ func (g *gen) writeSaveDerivedVar(b *buffer, name t.ID, typ *a.TypeExpr, footer
|
||||
bPrefix, nameStr, aPrefix, nameStr, aPrefix, nameStr)
|
||||
b.printf("%s%s.buf->ri += n;", aPrefix, nameStr)
|
||||
|
||||
if s := noOpPerformanceHacks[nophKey{
|
||||
gCurrFunkCName: g.currFunk.cName,
|
||||
genMethod: "writeSaveDerivedVar",
|
||||
headerFooter: footer,
|
||||
}]; s != "" {
|
||||
b.writes(s)
|
||||
}
|
||||
|
||||
if footer {
|
||||
b.printf("PUFFS_BASE__IGNORE_POTENTIALLY_UNUSED_VARIABLE(%srend_%s);", bPrefix, nameStr)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user