Skip to content

slices: low performance from common misuse of Delete #58818

@earthboundkid

Description

@earthboundkid

Problem:

A quick search for slices.Delete on SourceGraph shows that many calls to slices.Delete are preceded by a call to slices.Index. This is often done in a loop, leading to needlessly terrible performance.

Possible solutions:

  • Remove Delete from the standard library slices package.
  • Accept and add slices: add DeleteFunc #54768 before slices is added to the standard library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions