grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

Upgrade to using math/rand/v2 to get perf enhancements

Open arvindbr8 opened this issue 1 year ago • 6 comments

Follow up from: https://github.com/grpc/grpc-go/pull/7283#issuecomment-2142662503

Go1.22 introduced a new rand package with a lot of improvements. See: go.dev/blog/randv2.

We would love to update our usages of math/rand once gRPC-go requires Go 1.22 or later.

arvindbr8 avatar May 31 '24 18:05 arvindbr8

@arvindbr8 I would like to be assigned this task.

silaselisha avatar Jun 02 '24 15:06 silaselisha

@silaselisha assigned it to you

purnesh42H avatar Jun 04 '24 10:06 purnesh42H

This is blocked until we bump the minimum Go version supported to 1.22 in our go.mod.

easwars avatar Aug 30 '24 22:08 easwars

Is switching to randv2 still blocked?

marcoferrer avatar Oct 08 '24 20:10 marcoferrer

I see that we bumped up our minimum supported Go version to 1.22.7 in https://github.com/grpc/grpc-go/pull/7624. So, this should be unblocked.

@marcoferrer : Would you be interested in making this change? We'll be happy to review. Thanks.

easwars avatar Oct 08 '24 23:10 easwars

@easwars Sounds good. PR opened.

marcoferrer avatar Oct 08 '24 23:10 marcoferrer