mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +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
@@ -30,6 +30,7 @@ type funk struct {
|
||||
bFooter buffer
|
||||
|
||||
astFunc *a.Func
|
||||
cName string
|
||||
derivedVars map[t.ID]struct{}
|
||||
jumpTargets map[a.Loop]uint32
|
||||
coroSuspPoint uint32
|
||||
@@ -56,6 +57,13 @@ func (k *funk) jumpTarget(n a.Loop) (uint32, error) {
|
||||
return jt, nil
|
||||
}
|
||||
|
||||
func (g *gen) funcCName(n *a.Func) string {
|
||||
if r := n.Receiver(); r != 0 {
|
||||
return g.pkgPrefix + r.String(g.tm) + "__" + n.Name().String(g.tm)
|
||||
}
|
||||
return g.pkgPrefix + n.Name().String(g.tm)
|
||||
}
|
||||
|
||||
func (g *gen) writeFuncSignature(b *buffer, n *a.Func) error {
|
||||
// TODO: write n's return values.
|
||||
if n.Suspendible() {
|
||||
@@ -71,12 +79,8 @@ func (g *gen) writeFuncSignature(b *buffer, n *a.Func) error {
|
||||
return fmt.Errorf("TODO: multiple return values")
|
||||
}
|
||||
|
||||
b.writes(g.pkgPrefix)
|
||||
if r := n.Receiver(); r != 0 {
|
||||
b.writes(r.String(g.tm))
|
||||
b.writes("__")
|
||||
}
|
||||
b.printf("%s(", n.Name().String(g.tm))
|
||||
b.writes(g.funcCName(n))
|
||||
b.writeb('(')
|
||||
|
||||
comma := false
|
||||
if r := n.Receiver(); r != 0 {
|
||||
@@ -129,6 +133,7 @@ func (g *gen) writeFuncImpl(b *buffer, n *a.Func) error {
|
||||
func (g *gen) gatherFuncImpl(_ *buffer, n *a.Func) error {
|
||||
g.currFunk = funk{
|
||||
astFunc: n,
|
||||
cName: g.funcCName(n),
|
||||
public: n.Public(),
|
||||
suspendible: n.Suspendible(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user