V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gowl
V2EX  ›  分享发现

Why JavaScript Does Not Need a StringBuilder

  •  
  •   gowl · 2023-01-14 04:55:10 +08:00 · 1016 次点击
    这是一个创建于 713 天前的主题,其中的信息可能已经有所发展或是发生改变。

    To avoid O(n^2) char buffer copying, a “rope” node (JSRope) can be created to represent a delayed string concatenation. Concatenation (called flattening) is performed if and when a linear char array is requested. In general, ropes form a binary dag whose internal nodes are JSRope string headers with no associated char array and whose leaf nodes are linear strings.

    https://josephmate.github.io/java/javascript/stringbuilder/2020/07/27/javascript-does-not-need-stringbuilder.html

    2 条回复    2023-01-14 13:18:19 +08:00
    gowl
        1
    gowl  
    OP
       2023-01-14 13:03:40 +08:00
    看来纯技术话题没人感兴趣啊:)
    512357301
        2
    512357301  
       2023-01-14 13:18:19 +08:00 via Android
    v 站虽然学历不错,但是翻译成中文或许回复更多
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   956 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 20:13 · PVG 04:13 · LAX 12:13 · JFK 15:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.