Skip to content

Performance Improvments #48

Open
Open
@adic3x

Description

@adic3x

As I understand DecodeOption is 7 (for now) flags. And it checked very often, on each value decoding. So use HashSet is VERY ineffective in this case. I think it may be replaced by bit logical operation. You can write it manually or use some crate like bitflags. The good news is we can impl all used methods from HashSet to new 'bitflags' struct and don't change anything in code (yes, it would be better to rewrite huge files to use a macro and in the case of DecodeOption to pass not a pointer, but directly the value (because it will be just u8 or u16), but this is not really important).

Maybe I could do this and make a pull request, but I want to know the author's opinion.

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