Skip to content

Conversation

Fangliding
Copy link
Member

@Fangliding Fangliding commented Aug 30, 2025

唯一会增加性能的地方 其他panic我看了一下绝大多数都以数组越界的形式出现 没必要加有的没的
至于writeString节省拷贝开销我自己写了一个确实可以节省的版本 没有观测到肉眼可见的变化 而且脑测需要单次写入极大的数据才会形成差距 但凡跟一下都会发现这个东西一般都是写一些控制信息 或者非常短的玩意(比如http/1.1里的换行符) 不参与高强度热循环

@frayZV

This comment was marked as spam.

@RPRX RPRX changed the title Buf: Replace copy zero with clear() common/buf/buffer.go: Replace copy zero with clear() Aug 30, 2025
@RPRX RPRX merged commit 79325ea into main Aug 30, 2025
80 of 82 checks passed
@RPRX RPRX deleted the buf branch August 30, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants