V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
TangMonk
V2EX  ›  Go 编程语言

golang 可以使用动态链接库来缩短编译时间吗?

  •  
  •   TangMonk · 2018-02-28 21:33:19 +08:00 · 1595 次点击
    这是一个创建于 2247 天前的主题,其中的信息可能已经有所发展或是发生改变。
    7 条回复    2018-03-01 01:59:14 +08:00
    heww
        1
    heww  
       2018-02-28 21:47:17 +08:00   ❤️ 1
    请升级到 go 1.10

    This release improves caching of built packages, adds caching of successful test results, runs vet automatically during tests, and permits passing string values directly between Go and C using cgo.

    https://golang.org/doc/go1.10
    zhs227
        2
    zhs227  
       2018-02-28 22:01:22 +08:00   ❤️ 1
    升级到 1.10 以后,由于编译 cache 的存在,基本上已经感受不到编译时间了
    cholerae
        3
    cholerae  
       2018-02-28 22:08:56 +08:00
    没必要
    dexter
        4
    dexter  
       2018-02-28 22:13:22 +08:00 via Android
    不是很懂。
    janxin
        5
    janxin  
       2018-02-28 22:15:06 +08:00
    因为有 cache 确实不需要动态库加速了
    wlwood
        6
    wlwood  
       2018-02-28 22:23:25 +08:00 via Android
    缩短时间? Go 编译时间很长吗?
    gs139
        7
    gs139  
       2018-03-01 01:59:14 +08:00
    @heww
    @zhs227

    我用 beego 的自动检测变动自动编译工具运行:bee run project,改动代码后自动编译还是得花费 3 秒左右的时间,是 bee 没用到 golang 1.10 的优势吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1599 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:03 · PVG 01:03 · LAX 10:03 · JFK 13:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.