Commit cdd7f89
committed
brackets: Optimize the character iteration
Test case: See the first comment of issue #295.
Before:
num calls time self name
-----------------------------------------------------------------------------------
1) 14 284.67 20.33 82.84% 284.67 20.33 82.84% _zsh_highlight_highlighter_brackets_paint
2) 15 313.72 20.91 91.30% 26.62 1.77 7.75% _zsh_highlight
3) 14 318.68 22.76 92.74% 7.41 0.53 2.16% _zsh_highlight_call_widget
After:
num calls time self name
-----------------------------------------------------------------------------------
1) 15 57.25 3.82 45.33% 28.30 1.89 22.41% _zsh_highlight
2) 14 81.96 5.85 64.90% 27.02 1.93 21.40% _zsh_highlight_call_widget
3) 14 26.31 1.88 20.84% 26.31 1.88 20.84% _zsh_highlight_highlighter_brackets_paint
4) 2 10.66 5.33 8.44% 8.97 4.49 7.10% VCS_INFO_formats
5) 2 25.92 12.96 20.52% 7.72 3.86 6.11% VCS_INFO_get_data_git
(That's not in my everyday configuration but in my minimal testing
setup, which runs vcs_info with the default settings.)1 parent d62baa5 commit cdd7f89
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
0 commit comments