Skip to content

Inline direct calls to mem::forget in the frontend #15401

Closed
@pcwalton

Description

@pcwalton

When we see a direct call to mem::forget, we should just inline it in the frontend. This has two important benefits, one obvious and one not-so-obvious: (1) it reduces compilation time; (2) it can often avoid one memcpy, because of the way mem::forget is implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-compiletimeIssue: Problems and improvements with respect to compile times.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions