Thanks for taking the time for the clue. It seems that this is an open
issue.
Actually, It work for this case. aovid the alloc will have more benefit for
gc.
在2022年8月26日星期五 UTC+8 02:49:08 写道:
> Actually, looking more closely at your benchmark numbers, the trick does
> not work in your case.
I was try using net.Buffers for writev. But I meet a unexptected allocs in
benchmark.
https://go.dev/play/p/SHpxSYbP1I5
when I run the benchmark:
goos: linux
goarch: amd64
pkg: writev
BenchmarkWrite_Writev/escape-4 272901 4198 ns/op
24 B/op 1 allocs/
evaluated immediately, but the execution only
> happens later
>
> - sean
>
> On Sat, Jun 25, 2022, 21:40 Lee Chou wrote:
>
>> Hello,
>>
>> https://go.dev/play/p/J1tVplkIrjt
>>
>> why o1.Ref print `2` but p1.Ref print `1` ?
>> why o1.Ref pri
Hello,
https://go.dev/play/p/J1tVplkIrjt
why o1.Ref print `2` but p1.Ref print `1` ?
why o1.Ref print `2` but o2.NonRef print `3` ? it's so confused.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop rec