Re: [go-nuts] Surprising behaviour in x/time/rate

2024-07-22 Thread 'James Lees' via golang-nuts
Small update: I created #68541 to track this. On Friday 19 July 2024 at 22:52:50 UTC+1 Ian Lance Taylor wrote: > On Fri, Jul 19, 2024 at 1:52 PM 'James Lees' via golang-nuts > wrote: > > > > Hi there, > > I've never posted here, so apologies if I'm br

[go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-22 Thread Brendan Goldacker
I've been using the 1 billion row challenge as a way to learn go over the past few days. With my limited go experience, I've seem to hit a wall. I have my submission here . On my M1 macbook pro with 1

Re: [go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-22 Thread Ian Lance Taylor
On Mon, Jul 22, 2024 at 1:05 PM Brendan Goldacker wrote: > I've been using the 1 billion row challenge > as a way to learn > go over the past few days. With my limited go experience, I've seem to hit > a wall. > > I have my submission here

[go-nuts] Re: runtime: found bad pointer in Go heap when not using CGO and -race reveals nothing

2024-07-22 Thread Kalen Krempely
Thanks Jason! After more head banging in trying to narrow things down and taking yet another look through the existing issue reports you linked to I was able to find the fix. We were using a struct which had a field with type `strings.Builder`. The strings.Builder docs

Re: [go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-22 Thread ben...@gmail.com
Hi Brendan, this is a fun problem. I'm looking at https://github.com/Goldabj/1brc-go/blob/main/cmd/brc/log_processor.go, and I suspect the main thing is that you're converting []byte to string, which almost certainly allocates. You're also scanning through the bytes several times (first to find