-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
feat: add intRange
type
#707
Conversation
Thanks for contributing :) |
How does this compare to https://twitter.com/anuraghazru/status/1573328100246822917 and #669 (comment) ? |
I'm a little bit concerned about possible type complexity explosion here. Have you tested it with larger ranges? Maybe it would make sense to add an overload to use the simpler way when "step" is not specified? |
You are right, with "step" is significantly slower than without "step". I found I should use overload and try to resolve performance question with ps: range limit is 0-999 in any implementation |
these are the same principle: generate a anuraghazru and #669 way is generate a number tuple A of "0 - Start" and anonter number tuple B of "0 - End". then My why is generate a tuple of "0 - End", and use any other type when tuple index is small than anuraghazru's "float range" implementation way is transform |
@sindresorhus The latest commit used overload and improved performance when use |
Thanks :) |
Fixes #669