package
Version:
v0.0.0-...-f9b5f64
Opens a new window with list of versions in this module.
Published: Apr 26, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
BufferPool 定义了一个名为 BufferPool 的同步池(sync.Pool)。
此池被用于复用字符串缓冲区(strings.Builder)实例,以减少内存分配和垃圾回收的负担。
当需要创建新的字符串缓冲区时,此池会自动调用 New 函数创建一个新的实例,
否则会从池中获取一个已存在的实例
Concat 使用strings.Builder.WriteString()拼接字符串提高性能
Source Files
¶
Click to show internal directories.
Click to hide internal directories.