labubu
0D
V2EX  ›  问与答

用 c++写的 Python http 请求模块,速度极快

  •  
  •   labubu · Apr 15, 2020 · 1566 views
    This topic created in 2245 days ago, the information mentioned may be changed or developed.

    github 项目: https://github.com/daimiaopeng/fast_requests 项目是今天写的所以很简陋,暂且只支持 get 。

    测试: 循环 get("https://baidu.com") 100 次

    1.自己写的 4.2 秒

    2.requests 10.5 秒

    3.grequests 31.3 秒

    2 replies    2020-04-15 20:11:19 +08:00
    labubu
        1
    labubu  
    OP
       Apr 15, 2020
    好像投错区了,尴尬
    unixeno
        2
    unixeno  
       Apr 15, 2020 via Android
    建议本地开 web 服务器测试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4227 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 05:28 · PVG 13:28 · LAX 22:28 · JFK 01:28
    ♥ Do have faith in what you're doing.