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

Go 1.3 is released

  •  
  •   timothyye 2014-06-19 12:51:07 +08:00 2290 次点击
    这是一个创建于 4150 天前的主题,其中的信息可能已经有所发展或是发生改变。
    介绍: http://blog.golang.org/go1.3

    Go 1.3 Release Notes: http://golang.org/doc/go1.3

    跟1.2相比,golang的语法没有什么变化,而改进的是其他的一些功能,比如提供精确的GC,优化编译速度等……
    9 条回复    2014-06-21 16:26:42 +08:00
    pubby
        1
    pubby  
       2014-06-19 13:25:28 +08:00
    good,坐等freebsd pkg更新

    最近上的几个go服务进程确实内存占用有些大
    Livid
        2
    Livid  
    MOD
    PRO
       2014-06-19 13:54:40 +08:00
    之前用 ab 测试某个 go 的 web 编程框架,每隔几千个请求就会有一次停顿,然后就对 go 的 gc 印象比较深刻……
    guotie
        3
    guotie  
       2014-06-19 13:58:41 +08:00
    不错,新的起点
    missdeer
        4
    missdeer  
    /div>   2014-06-19 14:42:24 +08:00
    @Livid 然后Go社区的人有没有叫你不要用ab来做压力测试?
    Livid
        5
    Livid  
    MOD
    PRO
       2014-06-19 14:43:22 +08:00
    @missdeer 我没和人讨论过这个事情,只是一直对这个事情印象比较深刻……
    fx
        6
    fx  
       2014-06-19 16:55:21 +08:00
    @Livid gc现在还是stop the world
    cnbuff410
        7
    cnbuff410  
       2014-06-19 17:41:23 +08:00 via Android
    "The garbage collector has been sped up, using a concurrent sweep algorithm, better parallelization, and larger pages. The cumulative effect can be a 50-70% reduction in collector pause time."
    Virtao
        8
    Virtao  
       2014-06-19 17:57:17 +08:00
    Go确实还有很大的改进空间,不过底子比较好,只要方向没问题,很有前景。这次1.3正则库效率也有所提高,之前效率是PCRE的十分之一
    pubby
        9
    pubby  
       2014-06-21 16:26:42 +08:00
    升级到1.3 踩坑里去了

    Reader.Read

    54 // An instance of this general case is that a Reader returning
    55 // a non-zero number of bytes at the end of the input stream may
    56 // return either err == EOF or err == nil. The next Read should
    57 // return 0, EOF regardless.


    这里确实发生变化了:
    1.2 的时候 最后一次Read 读到n byte, err == nil ,后续Read才会err == EOF
    更新到1.3, 最后一次Read 读到n byte,并且err == EOF,不需要再次Read才会碰到EOF


    之前没有严格按照文档做的恶果 ~~~55~~~,不少代码要改了
    59 // Callers should always process the n > 0 bytes returned before
    60 // considering the error err. Doing so correctly handles I/O errors
    61 // that happen after reading some bytes and also both of the
    62 // allowed EOF behaviors.
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5640 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 31ms UTC 06:54 PVG 14:54 LAX 23:54 JFK 02:54
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86