ip2region v3.8.0 已经发布,IP 到地名映射库
ip2region v3.8.0 已经发布,IP 到地名映射库
此版本更新内容包括:
重构 python binding,添加 IPv6 支持:
- py_ip2region pypi 包支持:
pip3 install py-ip2region
util和searcher模块:
# 工具包模块,例如:ip 解析,版本信息,vectorIndex / buffer加载等
import ip2region.util as util
# xdb 查询实现模块
import ip2region.searcher as xdb
# 使用方式参考 python binding 的 ReadMe
- python binding 提供了对 IPv6 的查询支持,具体使用文档请参考 Python Binding,测试方式如下:
(.venv) ➜ python git:(master) python3 search_test.py --db=../../data/ip2region_v6.xdb
ip2region xdb searcher test program
source xdb: ../../data/ip2region_v6.xdb (IPv6, vectorIndex)
type 'quit' to exit
ip2region>> ::
{region: , ioCount: 1, took: 180 μs}
ip2region>> 240e:3b7:3272:d8d0:3b7b:3ee0:1d39:848
{region: 中国|广东省|深圳市|家庭宽带, ioCount: 8, took: 251 μs}
ip2region>> 2001:3:ffff:ffff:ffff:ffff:ffff:ffff
{region: 0|0|内网IP|内网IP, ioCount: 18, took: 474 μs}
ip2region>>
- 查询平均耗时:Razer 笔记本 / Ubuntu (电源均衡模式) + SATA SSD / VectorIndex 缓存,bench 结果如下:
(.venv) ➜ python git:(master) ✗ python3 bench_test.py --db=../../data/ip2region_v6.xdb --src=../../data/ipv6_source.txt --cache-policy=vectorIndex
searcher -> {"version": IPv6, "db_path": "../../data/ip2region_v6.xdb", "v_index": 524288, "c_buffer": None}
Bench finished, {cachePolicy: vectorIndex, total: 1614544, took: 65.378 s, cost: 40 μs/op}
161.45 万个 IPv6 平均查询耗时为 40 微秒/次。
关注公众号
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
-
上一篇
snail-job vsj1.8.1 已经发布,分布式重试服务平台
snail-job vsj1.8.1 已经发布,分布式重试服务平台。 功能优化 优化完善AOP时获取接口方法 删除hessian依赖 删除okhttp依赖及配置 BUG修复 MapInvokeHandler的invoke方法兼容Object对象的方法 修复code-mirror组件json格式化问题 定时任务-执行器页面,点击列设置,小弹窗为空白 版本升级 spring-boot:3.3.10 => 3.5.7 hutool: 5.8.32 => 5.8.40 mybatis-plus: 3.5.9 => 3.5.14 mapstruct: 1.5.3.Final => 1.6.3 pekko:1.2.0-M1 => 1.2.1 java-jwt: 4.4.0 => 4.5.0 aviator: 5.3.3 => 5.4.3 fory: 0.12.1 => 0.13.0 zstd: 1.5.5-5 => 1.5.7-6 grpc-java: 1.71.0 => 1.76.0 proto-google-common-protos...
-
下一篇
跨平台游戏引擎 Axmol-2.9.1 发布
Axmol 2.9.1 版本是一个以错误修复和功能改进为主的次要 LTS 长期支持版本,发布时间: 2025 年 11 月 2 日 🙏感谢所有对 axmol 项目的贡献者,包括财务赞助者:@scorewarrior(公司)、@peterkharitonov、@duong、@thienphuoc、@bingsoo、@asnagni、@paulocoutinhox 以及 历史赞助者 🙏我们衷心感谢 @scorewarrior(公司) 的鼎力支持——他们在 GitHub Sponsors 追加了每月 $2,000 的赞助金额,并在此之前已通过 Open Source Collective 持续每月赞助 $3,000。你们的慷慨帮助 Axmol 项目不断繁荣与成长。 仓库地址 GitHub (官方): https://github.com/axmolengine/axmol Gitee (镜像): https://gitee.com/simdsoft/axmol 相较于 2.9.0 的重要变更 改进 SDF 文本描边渲染,由 @halx99 提交 #2843 Bug 修复 修复同时启用描边...
相关文章
文章评论
共有0条评论来说两句吧...

微信收款码
支付宝收款码