mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Add comment on the performance of resuming locals
This commit is contained in:
1 parent
5a927d6905
commit
eb05139fcd
1 file changed
+4
-2
@@ -348,8 +348,10 @@ func (g *gen) writeResumeSuspend1(b *buffer, n *a.Var, suspend bool, initBoolTyp
|
|||||||
// This generated code explicitly initializes bool typed variables,
|
// This generated code explicitly initializes bool typed variables,
|
||||||
// in order to avoid ubsan (undefined behavior sanitizer) warnings.
|
// in order to avoid ubsan (undefined behavior sanitizer) warnings.
|
||||||
//
|
//
|
||||||
// In general, we don't zero-initialize all of the v_etc local
|
// In general, we don't initialize (set to zero or assign from
|
||||||
// variables due to the negative performance impact.
|
// "this" fields) all of the v_etc local variables when not
|
||||||
|
// resuming a coroutine, due to the performance impact. Commit
|
||||||
|
// 2b6b0ac "Unconditionally resume local vars" has some numbers.
|
||||||
rhs = "false"
|
rhs = "false"
|
||||||
}
|
}
|
||||||
if suspend {
|
if suspend {
|
||||||
|
|||||||
Reference in new issue
Block a user