Skip to content

isValidResult could be more efficient #1

@singularperturbation

Description

@singularperturbation

We only really need to build up a set of valid characters in the input alphabet once, in the generateDecoder factory function. Then, we can get rid of toCharset (and make isValid string -> set[char] -> bool instead of string -> string -> bool).

This makes the decoder function more efficient, since we aren't repeatedly constructing the character set of valid characters on each call.

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