Re: [go-nuts] Comparison of pointers to distinct zero-sized variables

2024-06-26 Thread Ian Lance Taylor
On Tue, Jun 25, 2024 at 9:37 PM 'Axel Wagner' via golang-nuts wrote: > > you might be interested to learn that Ian has filed a CL adding an FAQ entry. Now committed at https://go.dev/doc/faq#zero_size_types . Ian -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] why we still need lock file ?

2024-06-26 Thread ben...@gmail.com
It's a pretty good bet that Akash is asking about go.sum. Akash, the go.sum is not actually a "lock file" (like many other languages' package managers have). Just go.mod is enough to determine the exact versions of all the modules, as you indicate. What go.sum contains are cryptographic hashes o

[go-nuts] Re: Performance of unique package

2024-06-26 Thread Juliusz Chroboczek
After fixing the bugs pointed out by Michael (I'm incompetent), here are the new results: Uninterned-8120ms ą18% Map-8 140ms ą 2% LockedMap-8 139ms ą 2% LockedParellel-8146ms ą 2% SyncMap-8 253ms ą 4% SyncMapParallel-8 109ms ą 9

Re: [go-nuts] why we still need lock file ?

2024-06-26 Thread Ian Lance Taylor
On Tue, Jun 25, 2024 at 11:58 PM Akash Kumar wrote: > > As go is using minimum version selection strategy for creating reproducible > build list, so why we still need a lock file ? also is there plans to > deprecate lock file in future ? What lock file are you talking about? Ian -- You recei

[go-nuts] Re: Performance of unique package

2024-06-26 Thread Juliusz Chroboczek
> In terms of lookup/insertion/etc., I would expect unique.Make to perform > much better than a locked map when doing operations in parallel, but > perform slightly worse when everything is done on a single core. It looks like your intuition was correct. Sync.Map still performs better, though.

[go-nuts] Re: Performance of unique package

2024-06-26 Thread Juliusz Chroboczek
> In terms of lookup/insertion/etc., I would expect unique.Make to perform > much better than a locked map when doing operations in parallel, but > perform slightly worse when everything is done on a single core. Thanks, that's encouraging. I'll see if I can conjure a realistic benchmark. -- Yo

Re: [go-nuts] How does bytealg.MakeNoZero() work?

2024-06-26 Thread Mike Schinkel
> On Jun 26, 2024, at 2:46 AM, Axel Wagner > wrote: > > It is defined in the runtime and go:linkname'd into the bytealg package: > https://github.com/golang/go/blob/90bcc552c0347948166817a602f612f219bc980c/src/runtime/slice.go#L394 > >