♻️ refactor: rustify writer utility test_free_rows
#319
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
动机
biliass rustify 计划
biliass(replaceprotobufdep with rust binding) #306filter_bad_chars#309Commentstruct #311convert_timestamp#312ass_escape#314convert_color#315get_zoom_factor#316convert_flash_rotation#317OptionComment#318test_free_rows#319解决方案
本 PR 带来部分性能提升(72s -> 60s)
重写后的函数很快,而且是调用次数最多的函数,只需要 500ns 左右(可能更快),理应拿到较大的性能收益,但包装为 pybind 函数后,则到了 5000ns 量级,和纯 python 实现差不多,因此还需要外部调度的 for 循环下沉后才会显现真正的性能收益
类型