prof

package
v0.0.0-...-f9b5f64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BufferPool = sync.Pool{
	New: func() interface{} {
		return new(strings.Builder)
	},
}

BufferPool 定义了一个名为 BufferPool 的同步池(sync.Pool)。 此池被用于复用字符串缓冲区(strings.Builder)实例,以减少内存分配和垃圾回收的负担。 当需要创建新的字符串缓冲区时,此池会自动调用 New 函数创建一个新的实例, 否则会从池中获取一个已存在的实例

Functions

func Concat

func Concat(s ...string) string

Concat 使用strings.Builder.WriteString()拼接字符串提高性能

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL