Skip to content

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

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.

Activity

  1. huonw commented on Jul 4, 2014

    @huonw
    Contributor

    Also addressed by #12634.

  2. luqmana commented on Jul 18, 2014

    @luqmana
    Contributor

    Since we no longer translate intrinsics as function calls the only thing left here to just get rid of the wrapper in core::men and instead just make it a use core::intrinsics::forget.

  3. added a commit that references this issue on Aug 22, 2014
    07d86b4
  4. added a commit that references this issue on Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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