V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Loser110
V2EX  ›  程序员

各个语言 podman 打包对比 PHP golang rust

  •  
  •   Loser110 · 2 小时 51 分钟前 · 84 次点击
    最近在重构 php 网站,在不断的测试其他语言,一些结论,仅供参考。

    hello world 速度上
    laravel octane+frakenphp 200ms
    flightphp 20ms
    golang 2ms
    rust 没测试

    打包文件大小上 prod
    Laravel 大约 600M ,具体不记得了,删掉了
    python litestar 313 MB
    golang 11.8 MB


    我以为 golang 是王者了,结果,刚刚测试 rust 4.87 MB

    打包文件 dev 模式
    golang 1.1G
    rust 1.7G

    内存占用上 ( podman stats )
    golang 2.806MB
    rust 524.3kB

    CPU time
    go 268.388ms
    rust 34.221ms

    不得不说,podman 部署是真方便,用 AI 写好脚本,zero downtime 一键部署到 N 个机器

    本地开发也方便,线上打包好开发环境,直接下载,然后 dev start 就行

    rust hello world 刚刚上线,感觉不错,稍微不好的地方是 本地 podman hotreload 有点慢,改了代码要等 2s ,go 不用等
    目前尚无回复
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2393 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 16:09 · PVG 00:09 · LAX 08:09 · JFK 11:09
    ♥ Do have faith in what you're doing.