Skip to content

Rewrite fmt! for performance #3571

Closed
Closed

Description

@brson

fmt was written in the stone ages and is not fast. It should be rewritten to use either an io::Writer or some kind of string builder, and it should use stack allocation everywhere it can. It should not emit lots of inline code to bloat up function bodies, instead delegating to core::extfmt functions marked with #[inline], leaving the amount of inlining up to LLVM.

Activity

  1. brson commented on Sep 24, 2012

    @brson
    ContributorAuthor

    It should also probably use traits to work with more types, per #1653

  2. catamorphism commented on Mar 26, 2013

    @catamorphism
    Contributor

    Not critical for 0.6, de-milestoning

  3. catamorphism commented on Jun 3, 2013

    @catamorphism
    Contributor

    This doesn't seem to have been nominated, but had a milestone attached. Does this really need to be on production-ready? Is fmt! usually a huge performance bottleneck? Re-nominating so we can discuss.

  4. graydon commented on Jun 20, 2013

    @graydon
    Contributor

    accepted for backwards-compatible milestone

  5. alexcrichton commented on Aug 11, 2013

    @alexcrichton
    Member

    This is currently underway with the new ifmt! syntax extension. While not completely done, I think that the remaining progress of that extension is better tracked in the #2249 metabug.

  6. added 2 commits that reference this issue on Aug 21, 2026
    bee5cdb
    50f4ae7
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-frontendI-slow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions