k-sone / critbitgo

crit-bit for golang and its applications (sorted map, IP routing table)
MIT License
45 stars 14 forks source link

Add ContainedIP() as fast way to check an IP #7

Closed bboreham closed 6 years ago

bboreham commented 6 years ago

Hi, wondering if you would consider adding this because it gives a ~10% performance improvement in a project I work on.

Change is to avoid creating a route object, for callers that don't need it.

k-sone commented 6 years ago

Sorry for responding late.

It looks good. Thank you for your contribution!