Skip to content

Determine cost/benefit of optimizing the allocations #2

@museun

Description

@museun

There are plenty of clone()/Box::new/to_string() calls. They can be removed with a bit of effort.

Running it over a cargo metadata for a large workspace (522.1 KiB on a single line) in release mode results in:

> wc md.json
       1    4231  534587 .\md.json
peak    7.10MiB
real    0.080s
user    0.062s
sys     0.000s

7 MiB isn't terrible but it could be better.

And on a larger file:

> wc big.json
       1   14754 1669588 .\big.json
peak    13.43MiB
real    0.061s
user    0.047s
sys     0.000s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions