Re: [go-nuts] why golang not provide likely/unlikely syntax?

2023-03-20 Thread cheng dong
pgo is great tool for optmize branch prediction, hope branch prediction feature merge into pgo as soon as possible On Tuesday, March 21, 2023 at 5:49:34 AM UTC+8 Ian Lance Taylor wrote: > On Mon, Mar 20, 2023 at 9:17 AM cheng dong wrote: > > > > i see golang source ssa guess BranchLikely/Branch

Re: [go-nuts] why golang not provide likely/unlikely syntax?

2023-03-20 Thread Ian Lance Taylor
On Mon, Mar 20, 2023 at 9:17 AM cheng dong wrote: > > i see golang source ssa guess BranchLikely/BranchUnLikely, however we could > not tell golang whether if is likely or unlikely. and looks the guess logic > might be far away from real condition We don't want to complicate the language. Also

Re: [go-nuts] Issue with glog https://github.com/golang/glog/releases/tag/v1.1.0

2023-03-20 Thread 'Chressie Himpel' via golang-nuts
On Mon, Mar 20, 2023 at 4:44 PM chandra sekhar wrote: > > Hi, > I see that you have already provided a fix for this issue > https://github.com/golang/glog/commit/9c9801e69114b582b12aa7010c75fe2105ae23b3. > Any idea when you will make a new tag release with this fix? I have another fix in the pip

[go-nuts] Re: Ask about Golang Behavior

2023-03-20 Thread jake...@gmail.com
You have: fmt.Println("AFTER:", newMessage.Biawaks == nil, cap(message.Biawaks)) Did you mean: fmt.Println("AFTER:", newMessage.Biawaks == nil, cap( newMessage.Biawaks)) If so, then On Monday, March 20, 2023 at 11:44:54 AM UTC-4 febriananda pramudita wrote: > I was playing with protobuf marshal

[go-nuts] Re: Ask about Golang Behavior

2023-03-20 Thread Brian Candler
On Monday, 20 March 2023 at 16:15:28 UTC Tamás Gulácsi wrote: You should print cap(newMessage.Biawaks). Good catch on that typo :-) FWIW, here it is as a playground link: https://go.dev/play/p/CHaW3lMutXN -- You received this message because you are subscribed to the Google Groups "golang-nu

[go-nuts] why golang not provide likely/unlikely syntax?

2023-03-20 Thread cheng dong
i see golang source ssa guess BranchLikely/BranchUnLikely, however we could not tell golang whether if is likely or unlikely. and looks the guess logic might be far away from real condition -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To uns

[go-nuts] Re: Ask about Golang Behavior

2023-03-20 Thread Tamás Gulácsi
You should print cap(newMessage.Biawaks). A nil slice cannot have non-zero capacity. A nil slice and a zero-length slice is semantically equivalent. febriananda pramudita a következőt írta (2023. március 20., hétfő, 16:44:54 UTC+1): > I was playing with protobuf marshaller recently and found thi

[go-nuts] Ask about Golang Behavior

2023-03-20 Thread febriananda pramudita
I was playing with protobuf marshaller recently and found this behavior https://gist.github.com/FwP-pintu/448f8ecddf27987a7e5b8a103eda12cb Is behavior: "nil slice with more than 0 capacity" is intended? Thank you. -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] Issue with glog https://github.com/golang/glog/releases/tag/v1.1.0

2023-03-20 Thread chandra sekhar
Hi, I see that you have already provided a fix for this issue https://github.com/golang/glog/commit/9c9801e69114b582b12aa7010c75fe2105ae23b3 . Any idea when you will make a new tag release with this fix? Regards, Chandra R. On Thursday, March 16, 2023 at 9:17:20 PM UTC+2 Chressie Himpel wrote: