gpt4 book ai didi

string - Perl 5 何时获得 Copy-On-Write 字符串?

转载 作者:行者123 更新时间:2023-12-01 12:22:20 24 4
gpt4 key购买 nike

我知道 Perl 5 现在有 COW 字符串,但我不记得它们是什么时候实现的。

最佳答案

似乎是 Perl 5.20.0 :

Perl has a new copy-on-write mechanism that avoids the need to copy the internal string buffer when assigning from one scalar to another. This makes copying large strings appear much faster. Modifying one of the two (or more) strings after an assignment will force a copy internally. This makes it unnecessary to pass strings by reference for efficiency.

关于string - Perl 5 何时获得 Copy-On-Write 字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43211463/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com