You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we loop-through all the comment-types and then determine the comment-type with the smallest index.
However, it's highly possible that some comment-types never exist in the whole content, ending-up O(n), where n is number of the bytes in the content.
It's better that we loop-through the content and check whether the byte is the starting point of some comment-type.
Given that we do MatchComment a lot in commentDBCS, this should improve speed significantly.
The text was updated successfully, but these errors were encountered:
Provide the github link(s) of the file#line (請提供 github 關於 code 的 link)
https://github.com/Ptt-official-app/go-openbbsmiddleware/blob/main/dbcs/match_comment.go#L56
What would you like to discuss (你想要討論什麼呢?~)
Currently we loop-through all the comment-types and then determine the comment-type with the smallest index.
However, it's highly possible that some comment-types never exist in the whole content, ending-up O(n), where n is number of the bytes in the content.
It's better that we loop-through the content and check whether the byte is the starting point of some comment-type.
Given that we do MatchComment a lot in commentDBCS, this should improve speed significantly.
The text was updated successfully, but these errors were encountered: