Message78673
I'm biased ;) but I don't see what netaddr provides over ipaddr. it
also seems to be in the neighborhood of 50% slower (at least on my mac
mini).
pmoody@mini - 04:52 PM - ~/Downloads/ipaddr-1.0.1
-> python -m timeit 'import ipaddr;\
ipaddr.IP("1.1.1.1")'
10000 loops, best of 3: 46.2 usec per loop
pmoody@mini - 04:52 PM - ~/Downloads/netaddr-0.5.2
-> python -m timeit 'import netaddr;\
netaddr.IP("1.1.1.1")'
10000 loops, best of 3: 71.9 usec per loop
dealing with netmasks, the difference is even greater.
pmoody@mini - 04:52 PM - ~/Downloads/ipaddr-1.0.1
-> python -m timeit 'import ipaddr;\
ipaddr.IP("1.1.1.1/255.255.255.0")'
10000 loops, best of 3: 78.4 usec per loop
pmoody@mini - 04:49 PM - ~/Downloads/netaddr-0.5.2
-> python -m timeit 'import netaddr;\
> netaddr.IP("1.1.1.1/255.255.255.0")'
1000 loops, best of 3: 247 usec per loop
(and it doesn't seem to deal with hostsmasked addresses).
it also seems to be layed out in an unintuitive way, treating address
ranges a something very different than network addresses. hopefully
someone who isn't intimately familiar with both libraries can comment,
but ipaddr feels a lot cleaner to me. |
|
Date |
User |
Action |
Args |
2009-01-01 01:08:20 | pmoody | set | recipients:
+ pmoody, gvanrossum, loewis, vstinner, giampaolo.rodola, benjamin.peterson, mattsmart, shields, drkjam |
2009-01-01 01:08:19 | pmoody | set | messageid: <1230772099.62.0.283432939327.issue3959@psf.upfronthosting.co.za> |
2009-01-01 01:08:17 | pmoody | link | issue3959 messages |
2009-01-01 01:08:15 | pmoody | create | |
|