240 发简信
IP属地:广东
  • 有两个小疑问:
    1. bufio.NewReader(f) 默认buf=4096, read时lines长度250*1024, read会直接读取到lines中,很可能读满,后续append操作会扩容,频繁扩容会导致性能下降,失去pool缓存的作用?
    2. string是不可变对象,string的pool有什么作用吗?

    Go:实现秒级读取16GB文件

    【译文】原文地址[https://medium.com/swlh/processing-16gb-file-in-seconds-go-lang-3982c235dfa2]如...