Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isValidResult could be more efficient #1

Open
singularperturbation opened this issue Oct 8, 2015 · 0 comments
Open

isValidResult could be more efficient #1

singularperturbation opened this issue Oct 8, 2015 · 0 comments

Comments

@singularperturbation
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant