Skip to content

Conversation

BillWangCS
Copy link

黄大神,我发现sdstrim的查找操作(strchr)可以用字符哈希的思想重写,将查找复杂度降为O(1),从而使整个trim的时间复杂度降为O(M+N),M为c字符串长度,N为SDS的buf长度,你看看对不对?

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.

1 participant