News for hackers. Stuff that matters.
Re:More powerful Go execution traces by swatcoder on Thursday March 14, 2024 @09:35PM (#39711199)
> The cost of race detection varies by program, but for a typical program, memory usage may increase by 5-10x and execution time by 2-20x.

That's "let's run the race detector and get some coffee" overhead, not "let's leave it on in dev" overhead.

Still cool that they have it available!

Re:More powerful Go execution traces by TheDong on Thursday March 14, 2024 @11:29PM (#39711792)
The main value of the race detector is enabling it for tests (go test -race), and then writing sufficiently exhaustive unit tests to cover all code paths.

I do think most gophers, instead of tests, use a combination of prayer and automatically restarting crashed processes when they inevitably panic from a race, which seems to work better than you'd expect!

Re:More powerful Go execution traces by cdelsolar on Thursday March 14, 2024 @10:34PM (#39711500)
I am always running everything in race mode when developing locally and have caught stuff before.