Posted in

Go字符替换必须掌握的7个冷门API:reflect.StringHeader、unsafe.String、utf8.RuneCountInString…(内部源码级解读)

第一章:Go字符替换的核心挑战与 … Go字符替换必须掌握的7个冷门API:reflect.StringHeader、unsafe.String、utf8.RuneCountInString…(内部源码级解读)Read more

Posted in

Go 3语言设置韩语:为什么runtime.GC()后韩语字符串突然变空?——unsafe.String与UTF-8边界对齐漏洞详解

第一章:Go 3语言韩语支持的演 … Go 3语言设置韩语:为什么runtime.GC()后韩语字符串突然变空?——unsafe.String与UTF-8边界对齐漏洞详解Read more

Posted in

字符串拼接真的慢吗?Go中5种常见操作耗时对比实测:+ vs strings.Builder vs bytes.Buffer vs fmt.Sprintf vs unsafe.String(含纳秒级基准测试数据)

第一章:字符串拼接性能基准测试的 … 字符串拼接真的慢吗?Go中5种常见操作耗时对比实测:+ vs strings.Builder vs bytes.Buffer vs fmt.Sprintf vs unsafe.String(含纳秒级基准测试数据)Read more

Posted in

Go字符串设计的“零拷贝”幻觉:string header不可变、unsafe.String()绕过检查、[]byte转string的2次内存语义陷阱

第一章:Go字符串设计的“零拷贝 … Go字符串设计的“零拷贝”幻觉:string header不可变、unsafe.String()绕过检查、[]byte转string的2次内存语义陷阱Read more

Posted in

Go embed.FS编译进binary后,文件内容物理存储在哪?——ELF section .rodata分析、string header指向与unsafe.String()反向提取实战

第一章:Go embed.FS编 … Go embed.FS编译进binary后,文件内容物理存储在哪?——ELF section .rodata分析、string header指向与unsafe.String()反向提取实战Read more