ayush00git commented on issue #3446:
URL: https://github.com/apache/fory/issues/3446#issuecomment-3988725484
Here are the outputs after i removed the `//go:noinline` from `growSlow()` -
``` bash
./buffer.go:49:6: can inline (*ByteBuffer).growSlow with cost 47 as:
method(*ByteBuffer) func(int) { needed := b.writerIndex + n; if needed <=
cap(b.data) { b.data = b.data[:cap(b.data)] } else { newCap := 2 * needed;
newBuf := make([]byte, newCap); copy(newBuf, b.data[:b.writerIndex]); b.data =
newBuf } }
./buffer.go:40:6: can inline (*ByteBuffer).grow with cost 60 as:
method(*ByteBuffer) func(int) { if b.writerIndex + n <= len(b.data) { return
}; (*ByteBuffer).growSlow(b, n) }
./buffer.go:85:6: can inline (*ByteBuffer).WriteInt8 with cost 75 as:
method(*ByteBuffer) func(int8) { (*ByteBuffer).grow(b, 1);
b.data[b.writerIndex] = byte(value); b.writerIndex++ }
./buffer.go:92:6: can inline (*ByteBuffer).WriteUint8 with cost 74 as:
method(*ByteBuffer) func(uint8) { (*ByteBuffer).grow(b, 1);
b.data[b.writerIndex] = value; b.writerIndex++ }
./buffer.go:211:6: cannot inline (*ByteBuffer).ReadInt8: function too
complex: cost 95 exceeds budget 80
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]