Skip to content

Conversation

@AlexFrazer
Copy link

#3

@pedro-teixeira
Copy link

+1

@pilosus
Copy link

pilosus commented Nov 6, 2016

Yes, please, merge that commit. Otherwise we have broken methods with xrange that don't work for python3. Even for python2 such a small range has a negligible performance advantage when you compare xrange with range:

$ python -m timeit -n 1000000 "import ip; ip.get_random_ip_v4_xrange()"
1000000 loops, best of 3: 7.86 usec per loop

$ python -m timeit -n 1000000 "import ip; ip.get_random_ip_v4_range()"
1000000 loops, best of 3: 8.09 usec per loop

@Narinas
Copy link

Narinas commented May 10, 2019

yes, it breaks with python3

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

Successfully merging this pull request may close these issues.

4 participants