Skip to content

runtime: consider using batched shuffle in selectgo #68933

Open
@josharian

Description

This is a minor optimization opportunity. runtime.selectgo typically does a shuffle of a fairly small number of channels. https://lemire.me/blog/2024/08/17/faster-random-integer-generation-with-batching/ introduces an optimization for such shuffles. It might be worth incorporating the technique into selectgo. (math/rand/v2 is probably not possible due to backwards compat.)

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performancecompiler/runtimeIssues related to the Go compiler and/or runtime.help wanted

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions