Skip to content

Stop instantiating fix_position so many times #386

Closed
@dtolnay

Description

@dtolnay

The lambda here unfortunately seems to capture the V type parameter so it is instantiated lots of times. This tiny function contributes more LLVM IR than all but 5 much larger functions in #313 (comment). It should be instantiated only once per R type parameter on your deserializer.

json/src/de.rs

Line 259 in c5f30c3

Err(err) => Err(err.fix_position(|code| self.error(code))),

@Rufflewind or @Coding-Doctors would you be interested in working on this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions