Skip to content

cmd/gc: optimized map[string] lookup from []byte key #3512

Description

@bradfitz
key := []byte("some key")  // from network, etc

var m map[string]T
....
v, ok := m[string(key)]  // It would be nice if this were optimized away and didn't
actually make a copy & garbage
....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions