mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
Many operations do not pass refs to Write. Similarly adding
...interface{} requires constructing a slice, which is slow.
This cuts about 100ns from RRect and Border benchmark.
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ type Event struct {
|
||||
}
|
||||
|
||||
func (p Op) Add(o *op.Ops) {
|
||||
data := o.Write(opconst.TypeProfileLen, p.Tag)
|
||||
data := o.Write1(opconst.TypeProfileLen, p.Tag)
|
||||
data[0] = byte(opconst.TypeProfile)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user