ITADN

More small optimizations

#562Pull Requestalexander-yakushev 创建于 2025-01-08
The first one saves a bit on that regexpy `str/replace` if the keyword already doesn't contain any hyphens. Alternatively, it could be rewritten into some explicit loop that looks for hyphens and then checks if they aren't on the edges of the string, but I don't think the complication is worth it. Checking for present hyphen is easy and quick, and given that most keywords don't have hyphens, this already saves most of what it is there to be saved. The second one is some streamlining of code inside `format-values`. The refactored version tries to do most of work inside the `reduce` loop, without pre-processing stuff with `map` first.
合并状态:未合并 关闭于 2025-01-17 7 条评论