mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Add check for interleaved coroutines
It's not an optimization per se, but it seems to help: name old speed new speed delta wuffs_deflate_decode_1k/clang5 138MB/s ± 1% 150MB/s ± 1% +8.96% (p=0.008 n=5+5) wuffs_deflate_decode_10k/clang5 223MB/s ± 0% 243MB/s ± 0% +9.25% (p=0.008 n=5+5) wuffs_deflate_decode_100k_just_one_read/clang5 263MB/s ± 2% 289MB/s ± 0% +10.19% (p=0.008 n=5+5) wuffs_deflate_decode_100k_many_big_reads/clang5 220MB/s ± 1% 243MB/s ± 0% +10.42% (p=0.008 n=5+5) wuffs_deflate_decode_1k/gcc7 158MB/s ± 0% 157MB/s ± 0% ~ (p=0.056 n=5+5) wuffs_deflate_decode_10k/gcc7 268MB/s ± 0% 268MB/s ± 0% ~ (p=1.000 n=5+5) wuffs_deflate_decode_100k_just_one_read/gcc7 312MB/s ± 0% 320MB/s ± 0% +2.62% (p=0.008 n=5+5) wuffs_deflate_decode_100k_many_big_reads/gcc7 254MB/s ± 0% 253MB/s ± 0% -0.48% (p=0.016 n=5+5)
This commit is contained in:
1 parent
d076b6e800
commit
ecccafab09
5 files changed
+131
No files matched your search
@@ -325,6 +325,8 @@ type gen struct {
|
||||
|
||||
currFunk funk
|
||||
funks map[t.QQID]funk
|
||||
|
||||
numPublicCoroutines uint32
|
||||
}
|
||||
|
||||
func (g *gen) generate() ([]byte, error) {
|
||||
@@ -712,6 +714,7 @@ func (g *gen) writeStructPrivateImpl(b *buffer, n *a.Struct) error {
|
||||
b.writes("struct {\n")
|
||||
if n.Classy() {
|
||||
b.writes("uint32_t magic;\n")
|
||||
b.writes("uint32_t active_coroutine;\n")
|
||||
b.writes("\n")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user