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.
在这个 PR 中我做了一些改进,以及一些自作主张的调整。
首先关于第一点,我实施它是因为可以使得压缩 gzip 后包变得更小了:
之前:
之后:
同时在效率上能够有微弱的提升:
在 Chrome 下运行数次,递归方案平均时长约在 242ms,循环方案时长约在 235ms,不过这个性能差异在正常的使用中我觉得几乎没影响。
第二点是我自作主张的调整,我认为全面的参数说明和英语能够更广泛的适应更多用户,如果你不喜欢这样的调整,我可以撤回。