Sebastian Gniazdowski
|
8e8969095b
|
*highlight: Don't highlight paths existing in CDPATH, unless it's cd
|
2016-10-31 11:37:42 +01:00 |
|
Sebastian Gniazdowski
|
68348d09ee
|
*higlight,hsmw: No need for is-at-least – test for ZSH_ARGZERO instead
|
2016-10-31 11:17:00 +01:00 |
|
Sebastian Gniazdowski
|
3d2ac47621
|
*highlight: Properly handle tokens with :. Don't add future tokens
|
2016-10-30 14:28:38 +01:00 |
|
Sebastian Gniazdowski
|
35058d6632
|
*highlight: Optimization and logic change: no path at command position
parse.zsh -oo, after changes:
Running time: 1.5690220000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1561,42 4,46 99,99% 1191,03 3,40 76,27% -hsmw-highlight-process
2) 2800 288,00 0,10 18,44% 288,00 0,10 18,44% -hsmw-highlight-string
3) 1750 47,38 0,03 3,03% 47,38 0,03 3,03% -hsmw-highlight-check-path
4) 1400 25,15 0,02 1,61% 25,15 0,02 1,61% -hsmw-highlight-main-type
5) 350 9,86 0,03 0,63% 9,86 0,03 0,63% -hsmw-highlight-stack-pop
6) 1 0,11 0,11 0,01% 0,11 0,11 0,01% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-30 12:12:35 +01:00 |
|
Sebastian Gniazdowski
|
7b04ca7d8e
|
*highlight: Highlight ]]
|
2016-10-30 11:42:53 +01:00 |
|
Sebastian Gniazdowski
|
9b73595c01
|
*highlight: Correctly handle ';;' at command place
The slow down is effect of INTERACTIVE_COMMENTS
parse.zsh -oo, after changes:
Running time: 1.5990070000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1591,56 4,55 99,99% 1201,14 3,43 75,47% -hsmw-highlight-process
2) 2800 292,64 0,10 18,39% 292,64 0,10 18,39% -hsmw-highlight-string
3) 2450 62,28 0,03 3,91% 62,28 0,03 3,91% -hsmw-highlight-check-path
4) 1400 25,69 0,02 1,61% 25,69 0,02 1,61% -hsmw-highlight-main-type
5) 350 9,80 0,03 0,62% 9,80 0,03 0,62% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-30 11:31:07 +01:00 |
|
Sebastian Gniazdowski
|
45ac0f3e89
|
*highlight: Support :modifiers in variables, in strings – naive support
|
2016-10-28 10:11:27 +02:00 |
|
Sebastian Gniazdowski
|
78a7f0cf79
|
*highlight: Optimization: Convert from BIT_* variables into integers
./parse.zsh -oo, after changes:
Running time: 1.5050810000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1497,75 4,28 99,99% 1132,48 3,24 75,61% -hsmw-highlight-process
2) 2800 267,48 0,10 17,86% 267,48 0,10 17,86% -hsmw-highlight-string
3) 2450 61,29 0,03 4,09% 61,29 0,03 4,09% -hsmw-highlight-check-path
4) 1400 24,89 0,02 1,66% 24,89 0,02 1,66% -hsmw-highlight-main-type
5) 350 11,61 0,03 0,78% 11,61 0,03 0,78% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 11:54:43 +02:00 |
|
Sebastian Gniazdowski
|
25f4e8bcd1
|
Revert "*highlight: Optimization: convert "$var" -> $var"
This reverts commit 453de0a0ab .
Turns out that ./parse ./to-parse works MUCH (almost 100ms) slower
without variables quoted.
./parse.zsh -oo, after changes:
Running time: 1.5502340000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1542,62 4,41 99,99% 1177,33 3,36 76,32% -hsmw-highlight-process
2) 2800 267,57 0,10 17,34% 267,57 0,10 17,34% -hsmw-highlight-string
3) 2450 61,97 0,03 4,02% 61,97 0,03 4,02% -hsmw-highlight-check-path
4) 1400 26,14 0,02 1,69% 26,14 0,02 1,69% -hsmw-highlight-main-type
5) 350 9,61 0,03 0,62% 9,61 0,03 0,62% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 11:22:09 +02:00 |
|
Sebastian Gniazdowski
|
fc6379f8d5
|
*highlight: Optimization: cdpath_dir declared outside *-check-path
parse.zsh -oo, after changes:
Running time: 1.5547670000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1547,01 4,42 99,99% 1183,65 3,38 76,50% -hsmw-highlight-process
2) 2800 266,89 0,10 17,25% 266,89 0,10 17,25% -hsmw-highlight-string
3) 2450 62,13 0,03 4,02% 62,13 0,03 4,02% -hsmw-highlight-check-path
4) 1400 24,75 0,02 1,60% 24,75 0,02 1,60% -hsmw-highlight-main-type
5) 350 9,59 0,03 0,62% 9,59 0,03 0,62% -hsmw-highlight-stack-pop
6) 1 0,14 0,14 0,01% 0,14 0,14 0,01% -hsmw-highlight-fill-option-variables
7) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -hsmw-highlight-init
|
2016-10-26 11:13:12 +02:00 |
|
Sebastian Gniazdowski
|
4b70d8d977
|
*highlight: Optimization: *-string doesn't need own match, mend, etc.
parse.zsh -oo, after changes:
Running time: 1.5645680000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1557,07 4,45 100,00% 1183,85 3,38 76,03% -hsmw-highlight-process
2) 2800 266,75 0,10 17,13% 266,75 0,10 17,13% -hsmw-highlight-string
3) 2450 72,70 0,03 4,67% 72,70 0,03 4,67% -hsmw-highlight-check-path
4) 1400 24,16 0,02 1,55% 24,16 0,02 1,55% -hsmw-highlight-main-type
5) 350 9,62 0,03 0,62% 9,62 0,03 0,62% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 11:07:39 +02:00 |
|
Sebastian Gniazdowski
|
610144c56f
|
*highlight: Optimization: declare *-string vars outside, once
parse.zsh -oo, after changes:
Running time: 1.5839050000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1576,36 4,50 99,99% 1177,23 3,36 74,68% -hsmw-highlight-process
2) 2800 292,16 0,10 18,53% 292,16 0,10 18,53% -hsmw-highlight-string
3) 2450 72,24 0,03 4,58% 72,24 0,03 4,58% -hsmw-highlight-check-path
4) 1400 24,98 0,02 1,58% 24,98 0,02 1,58% -hsmw-highlight-main-type
5) 350 9,74 0,03 0,62% 9,74 0,03 0,62% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 11:05:27 +02:00 |
|
Sebastian Gniazdowski
|
2c77ee78f2
|
*highlight: Regression in optimization: forgotten path-related code
parse.zsh -oo, after changes:
Running time: 1.6143310000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1606,98 4,59 99,99% 1177,02 3,36 73,24% -hsmw-highlight-process
2) 2800 321,60 0,11 20,01% 321,60 0,11 20,01% -hsmw-highlight-string
3) 2450 71,93 0,03 4,48% 71,93 0,03 4,48% -hsmw-highlight-check-path
4) 1400 26,73 0,02 1,66% 26,73 0,02 1,66% -hsmw-highlight-main-type
5) 350 9,70 0,03 0,60% 9,70 0,03 0,60% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 10:52:58 +02:00 |
|
Sebastian Gniazdowski
|
453de0a0ab
|
*highlight: Optimization: convert "$var" -> $var
parse.zsh -oo, after changes:
Running time: 1.6104070000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1602,90 4,58 99,99% 1175,70 3,36 73,34% -hsmw-highlight-process
2) 2800 321,34 0,11 20,05% 321,34 0,11 20,05% -hsmw-highlight-string
3) 2450 71,89 0,03 4,48% 71,89 0,03 4,48% -hsmw-highlight-check-path
4) 1400 24,41 0,02 1,52% 24,41 0,02 1,52% -hsmw-highlight-main-type
5) 350 9,55 0,03 0,60% 9,55 0,03 0,60% -hsmw-highlight-stack-pop
6) 1 0,11 0,11 0,01% 0,11 0,11 0,01% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 10:40:55 +02:00 |
|
Sebastian Gniazdowski
|
cdebb03ebb
|
*highlight: Optimization: Compress main region_highlight update code
parse.zsh -oo, after changes:
Running time: 1.6200120000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1612,65 4,61 100,00% 1181,71 3,38 73,27% -hsmw-highlight-process
2) 2800 323,54 0,12 20,06% 323,54 0,12 20,06% -hsmw-highlight-string
3) 2450 71,88 0,03 4,46% 71,88 0,03 4,46% -hsmw-highlight-check-path
4) 1400 25,71 0,02 1,59% 25,71 0,02 1,59% -hsmw-highlight-main-type
5) 350 9,81 0,03 0,61% 9,81 0,03 0,61% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 10:29:03 +02:00 |
|
Sebastian Gniazdowski
|
2fac0a8a53
|
*highlight: Optimization: add path highlight in place; fix a style
10 runs before: 16700, 10 runs after: 16679. After run was rather unlucky.
parse.zsh -oo, after changes:
Running time: 1.6341780000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1626,82 4,65 99,99% 1193,40 3,41 73,35% -hsmw-highlight-process
2) 2800 325,47 0,12 20,01% 325,47 0,12 20,01% -hsmw-highlight-string
3) 2450 71,76 0,03 4,41% 71,76 0,03 4,41% -hsmw-highlight-check-path
4) 1400 26,52 0,02 1,63% 26,52 0,02 1,63% -hsmw-highlight-main-type
5) 350 9,68 0,03 0,59% 9,68 0,03 0,59% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 10:15:58 +02:00 |
|
Sebastian Gniazdowski
|
5367ca4e1b
|
*highlight: Optimization: remove *-path-separators call (inline code)
parse.zsh -oo, after changes:
Running time: 1.6395310000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1632,01 4,66 100,00% 1203,20 3,44 73,72% -hsmw-highlight-process
2) 2800 322,99 0,12 19,79% 322,99 0,12 19,79% -hsmw-highlight-string
3) 2450 71,63 0,03 4,39% 71,63 0,03 4,39% -hsmw-highlight-check-path
4) 1400 24,49 0,02 1,50% 24,49 0,02 1,50% -hsmw-highlight-main-type
5) 350 9,70 0,03 0,59% 9,70 0,03 0,59% -hsmw-highlight-stack-pop
6) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
7) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 09:58:24 +02:00 |
|
Sebastian Gniazdowski
|
8cd7464b85
|
*highlight: Optimization: don't declare "pos" when not needed, in *tors
-hsmw-highlight-path-separators runs 1.5 - 2 ms faster
|
2016-10-26 09:30:35 +02:00 |
|
Sebastian Gniazdowski
|
ae8990c53b
|
*highlight: Optimization: There are no path_prefix_* styles anymore
parse.zsh -oo, after changes:
Running time: 1.6545150000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1647,16 4,71 99,99% 1211,88 3,46 73,57% -hsmw-highlight-process
2) 2800 324,01 0,12 19,67% 324,01 0,12 19,67% -hsmw-highlight-string
3) 2450 71,72 0,03 4,35% 71,72 0,03 4,35% -hsmw-highlight-check-path
4) 1400 24,49 0,02 1,49% 24,49 0,02 1,49% -hsmw-highlight-main-type
5) 350 9,73 0,03 0,59% 9,73 0,03 0,59% -hsmw-highlight-stack-pop
6) 350 5,32 0,02 0,32% 5,32 0,02 0,32% -hsmw-highlight-path-separators
7) 1 0,08 0,08 0,01% 0,08 0,08 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 09:25:11 +02:00 |
|
Sebastian Gniazdowski
|
2ede95f080
|
*highlight: Optimization: two arg_type conditions converted into one
./parse.zsh -oo, after changes:
Running time: 1.6606550000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1653,26 4,72 99,99% 1214,58 3,47 73,46% -hsmw-highlight-process
2) 2800 324,72 0,12 19,64% 324,72 0,12 19,64% -hsmw-highlight-string
3) 2450 72,02 0,03 4,36% 72,02 0,03 4,36% -hsmw-highlight-check-path
4) 1400 24,76 0,02 1,50% 24,76 0,02 1,50% -hsmw-highlight-main-type
5) 350 9,72 0,03 0,59% 9,72 0,03 0,59% -hsmw-highlight-stack-pop
6) 350 7,47 0,02 0,45% 7,47 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,10 0,10 0,01% 0,10 0,10 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-26 09:13:55 +02:00 |
|
Sebastian Gniazdowski
|
7031fc334e
|
*highlight: Use explicit strings not string-like patterns
|
2016-10-25 21:07:55 +02:00 |
|
Sebastian Gniazdowski
|
3414b244e4
|
*highlight: Optimization: compress '))' code. Also fix the style used
|
2016-10-25 21:04:57 +02:00 |
|
Sebastian Gniazdowski
|
ced97ae261
|
*highlight: Optimization: Don't assign style just to use its value
parse.zsh -oo, after changes:
Running time: 1.6640020000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1656,49 4,73 99,99% 1215,36 3,47 73,37% -hsmw-highlight-process
2) 2800 326,28 0,12 19,70% 326,28 0,12 19,70% -hsmw-highlight-string
3) 2450 72,58 0,03 4,38% 72,58 0,03 4,38% -hsmw-highlight-check-path
4) 1400 24,87 0,02 1,50% 24,87 0,02 1,50% -hsmw-highlight-main-type
5) 350 9,75 0,03 0,59% 9,75 0,03 0,59% -hsmw-highlight-stack-pop
6) 350 7,66 0,02 0,46% 7,66 0,02 0,46% -hsmw-highlight-path-separators
7) 1 0,08 0,08 0,00% 0,08 0,08 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 21:01:51 +02:00 |
|
Sebastian Gniazdowski
|
24aa777af6
|
*highlight: Format if in one line (the ${(P)MATCH} *-type code)
|
2016-10-25 20:56:52 +02:00 |
|
Sebastian Gniazdowski
|
002e127eb2
|
*highlight: Optimization: don't support broken links as valid paths
parse.zsh -oo, after changes:
Running time: 1.6690320000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1661,69 4,75 99,99% 1220,15 3,49 73,42% -hsmw-highlight-process
2) 2800 326,19 0,12 19,63% 326,19 0,12 19,63% -hsmw-highlight-string
3) 2450 72,28 0,03 4,35% 72,28 0,03 4,35% -hsmw-highlight-check-path
4) 1400 25,88 0,02 1,56% 25,88 0,02 1,56% -hsmw-highlight-main-type
5) 350 9,74 0,03 0,59% 9,74 0,03 0,59% -hsmw-highlight-stack-pop
6) 350 7,46 0,02 0,45% 7,46 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -hsmw-highlight-init
|
2016-10-25 20:53:55 +02:00 |
|
Sebastian Gniazdowski
|
8c2018bcb4
|
*highlight: Unneeded "$" in arithmetic context
|
2016-10-25 20:50:02 +02:00 |
|
Sebastian Gniazdowski
|
ca2e333cfd
|
*highlight: Optimization: use previous style value; compress
|
2016-10-25 20:47:34 +02:00 |
|
Sebastian Gniazdowski
|
5c30308699
|
*highlight: Optimization: use previous style value; compress
parse.zsh -oo, after changes:
Running time: 1.6716980000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1664,15 4,75 99,99% 1217,95 3,48 73,18% -hsmw-highlight-process
2) 2800 325,63 0,12 19,57% 325,63 0,12 19,57% -hsmw-highlight-string
3) 2450 77,34 0,03 4,65% 77,34 0,03 4,65% -hsmw-highlight-check-path
4) 1400 26,02 0,02 1,56% 26,02 0,02 1,56% -hsmw-highlight-main-type
5) 350 9,70 0,03 0,58% 9,70 0,03 0,58% -hsmw-highlight-stack-pop
6) 350 7,51 0,02 0,45% 7,51 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,12 0,12 0,01% 0,12 0,12 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -hsmw-highlight-init
|
2016-10-25 20:40:54 +02:00 |
|
Sebastian Gniazdowski
|
f65df29907
|
*highlight: Compress always-block related code, use explicit string
|
2016-10-25 20:36:04 +02:00 |
|
Sebastian Gniazdowski
|
07569cd060
|
*highlight: Optimization: no need to use REPLY in *check-path
parse.zsh -oo, after changes:
Running time: 1.6844930000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1677,00 4,79 99,99% 1227,55 3,51 73,20% -hsmw-highlight-process
2) 2800 328,17 0,12 19,57% 328,17 0,12 19,57% -hsmw-highlight-string
3) 2450 79,04 0,03 4,71% 79,04 0,03 4,71% -hsmw-highlight-check-path
4) 1400 24,98 0,02 1,49% 24,98 0,02 1,49% -hsmw-highlight-main-type
5) 350 9,73 0,03 0,58% 9,73 0,03 0,58% -hsmw-highlight-stack-pop
6) 350 7,53 0,02 0,45% 7,53 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,08 0,08 0,00% 0,08 0,08 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 20:23:44 +02:00 |
|
Sebastian Gniazdowski
|
bd1a7c4d7b
|
*highlight: Optimization: *-string doesn't need "return 0"
parse.zsh -oo, after changes:
Running time: 1.6861610000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1678,63 4,80 99,99% 1228,93 3,51 73,21% -hsmw-highlight-process
2) 2800 325,42 0,12 19,39% 325,42 0,12 19,39% -hsmw-highlight-string
3) 2450 80,89 0,03 4,82% 80,89 0,03 4,82% -hsmw-highlight-check-path
4) 1400 26,01 0,02 1,55% 26,01 0,02 1,55% -hsmw-highlight-main-type
5) 350 9,92 0,03 0,59% 9,92 0,03 0,59% -hsmw-highlight-stack-pop
6) 350 7,45 0,02 0,44% 7,45 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,10 0,10 0,01% 0,10 0,10 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 20:19:48 +02:00 |
|
Sebastian Gniazdowski
|
24aa05d2f7
|
*highlight: Compress path separator highlighting code
|
2016-10-25 20:14:56 +02:00 |
|
Sebastian Gniazdowski
|
11ccea242b
|
*highlight: Compress this_word = next_word code
|
2016-10-25 19:33:34 +02:00 |
|
Sebastian Gniazdowski
|
5febb0340f
|
*highlight: Optimization: *-type to not guard cache with ifs; compress
parse.zsh -oo, after changes:
Running time: 1.6934050000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1685,89 4,82 99,99% 1225,79 3,50 72,70% -hsmw-highlight-process
2) 2800 336,76 0,12 19,97% 336,76 0,12 19,97% -hsmw-highlight-string
3) 2450 80,37 0,03 4,77% 80,37 0,03 4,77% -hsmw-highlight-check-path
4) 1400 25,65 0,02 1,52% 25,65 0,02 1,52% -hsmw-highlight-main-type
5) 350 9,80 0,03 0,58% 9,80 0,03 0,58% -hsmw-highlight-stack-pop
6) 350 7,52 0,02 0,45% 7,52 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,09 0,09 0,01% 0,09 0,09 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 18:49:53 +02:00 |
|
Sebastian Gniazdowski
|
069cd53650
|
*highlight: Optimization: no "options_to_set" array, just set option
|
2016-10-25 18:41:23 +02:00 |
|
Sebastian Gniazdowski
|
b34feb304d
|
*highlight: Remove redundant setting of localoptions
|
2016-10-25 18:36:27 +02:00 |
|
Sebastian Gniazdowski
|
760fc6cc75
|
*highlight: Let "emulate" be first instruction in *process function
parse.zsh -oo, after changes:
Running time: 1.7100990000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1702,69 4,86 99,99% 1229,47 3,51 72,20% -hsmw-highlight-process
2) 2800 337,70 0,12 19,83% 337,70 0,12 19,83% -hsmw-highlight-string
3) 2450 79,86 0,03 4,69% 79,86 0,03 4,69% -hsmw-highlight-check-path
4) 1400 38,44 0,03 2,26% 38,44 0,03 2,26% -hsmw-highlight-main-type
5) 350 9,76 0,03 0,57% 9,76 0,03 0,57% -hsmw-highlight-stack-pop
6) 350 7,48 0,02 0,44% 7,48 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,09 0,09 0,01% 0,09 0,09 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 18:13:39 +02:00 |
|
Sebastian Gniazdowski
|
13b3934f76
|
*highlight: Define also "buf" and "len" at one "local", etc. keyword
parse.zsh -oo, after changes:
Running time: 1.7114690000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1704,09 4,87 100,00% 1229,84 3,51 72,17% -hsmw-highlight-process
2) 2800 337,05 0,12 19,78% 337,05 0,12 19,78% -hsmw-highlight-string
3) 2450 81,20 0,03 4,76% 81,20 0,03 4,76% -hsmw-highlight-check-path
4) 1400 38,61 0,03 2,27% 38,61 0,03 2,27% -hsmw-highlight-main-type
5) 350 9,85 0,03 0,58% 9,85 0,03 0,58% -hsmw-highlight-stack-pop
6) 350 7,54 0,02 0,44% 7,54 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 18:11:07 +02:00 |
|
Sebastian Gniazdowski
|
18cd426cb2
|
*highlight: Huge optimization: Don't redefine variables at each loop
parse.zsh -oo, after changes:
Running time: 1.7135350000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1706,03 4,87 99,99% 1230,37 3,52 72,11% -hsmw-highlight-process
2) 2800 338,39 0,12 19,83% 338,39 0,12 19,83% -hsmw-highlight-string
3) 2450 81,56 0,03 4,78% 81,56 0,03 4,78% -hsmw-highlight-check-path
4) 1400 38,43 0,03 2,25% 38,43 0,03 2,25% -hsmw-highlight-main-type
5) 350 9,85 0,03 0,58% 9,85 0,03 0,58% -hsmw-highlight-stack-pop
6) 350 7,44 0,02 0,44% 7,44 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,12 0,12 0,01% 0,12 0,12 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 18:06:45 +02:00 |
|
Sebastian Gniazdowski
|
1a5ac41130
|
*highlight: Optimization: don't do ! (( ... )), instead do (( ... ==0 ))
parse.zsh -oo, after changes:
Running time: 1.7914460000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1784,00 5,10 100,00% 1310,16 3,74 73,44% -hsmw-highlight-process
2) 2800 334,93 0,12 18,77% 334,93 0,12 18,77% -hsmw-highlight-string
3) 2450 81,08 0,03 4,54% 81,08 0,03 4,54% -hsmw-highlight-check-path
4) 1400 40,07 0,03 2,25% 40,07 0,03 2,25% -hsmw-highlight-main-type
5) 350 9,76 0,03 0,55% 9,76 0,03 0,55% -hsmw-highlight-stack-pop
6) 350 8,00 0,02 0,45% 8,00 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 17:58:49 +02:00 |
|
Sebastian Gniazdowski
|
a558600315
|
*highlight: Better code handling history expansion
Times like 181x ms seem to occur more often.
|
2016-10-25 17:54:42 +02:00 |
|
Sebastian Gniazdowski
|
56aa7592b7
|
*highlight: Optimization: compress code handling braces, always block
parse.zsh -oo, after changes:
Running time: 1.7983390000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1790,84 5,12 99,99% 1316,27 3,76 73,50% -hsmw-highlight-process
2) 2800 335,29 0,12 18,72% 335,29 0,12 18,72% -hsmw-highlight-string
3) 2450 80,24 0,03 4,48% 80,24 0,03 4,48% -hsmw-highlight-check-path
4) 1400 41,35 0,03 2,31% 41,35 0,03 2,31% -hsmw-highlight-main-type
5) 350 9,70 0,03 0,54% 9,70 0,03 0,54% -hsmw-highlight-stack-pop
6) 350 7,99 0,02 0,45% 7,99 0,02 0,45% -hsmw-highlight-path-separators
7) 1 0,09 0,09 0,01% 0,09 0,09 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 17:48:51 +02:00 |
|
Sebastian Gniazdowski
|
8996f4c281
|
*highlight: Optimization: compress code handling MULTI_FUNC_DEF
|
2016-10-25 17:44:51 +02:00 |
|
Sebastian Gniazdowski
|
bd6e44859c
|
*highlight: Make '|| false' a comment
parse.zsh -oo, after changes:
Running time: 1.8009350000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1793,49 5,12 100,00% 1319,59 3,77 73,57% -hsmw-highlight-process
2) 2800 336,92 0,12 18,78% 336,92 0,12 18,78% -hsmw-highlight-string
3) 2450 80,77 0,03 4,50% 80,77 0,03 4,50% -hsmw-highlight-check-path
4) 1400 38,54 0,03 2,15% 38,54 0,03 2,15% -hsmw-highlight-main-type
5) 350 9,74 0,03 0,54% 9,74 0,03 0,54% -hsmw-highlight-stack-pop
6) 350 7,93 0,02 0,44% 7,93 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 17:36:57 +02:00 |
|
Sebastian Gniazdowski
|
b6704cca92
|
*highlight: Unneded "already_added=1"
|
2016-10-25 17:34:13 +02:00 |
|
Sebastian Gniazdowski
|
fddf05f911
|
*highlight: One more betterment of history expansion related code
|
2016-10-25 17:32:10 +02:00 |
|
Sebastian Gniazdowski
|
2b7656552a
|
*highlight: Optimization: better code that handles history expansion
parse.zsh -oo, after changes:
Running time: 1.8102530000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1802,80 5,15 100,00% 1325,15 3,79 73,50% -hsmw-highlight-process
2) 2800 339,52 0,12 18,83% 339,52 0,12 18,83% -hsmw-highlight-string
3) 2450 81,13 0,03 4,50% 81,13 0,03 4,50% -hsmw-highlight-check-path
4) 1400 39,34 0,03 2,18% 39,34 0,03 2,18% -hsmw-highlight-main-type
5) 350 9,77 0,03 0,54% 9,77 0,03 0,54% -hsmw-highlight-stack-pop
6) 350 7,89 0,02 0,44% 7,89 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,08 0,08 0,00% 0,08 0,08 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 17:29:46 +02:00 |
|
Sebastian Gniazdowski
|
b8f92d4f89
|
*highlight: Compress code handling assignments
|
2016-10-25 17:24:05 +02:00 |
|
Sebastian Gniazdowski
|
0915653d7d
|
*highlight: More correct array assignment detection
|
2016-10-25 17:19:18 +02:00 |
|
Sebastian Gniazdowski
|
1dcfc3c372
|
*highlight: Don't redefine already_added, don't set it for comments
parse.zsh -oo, after changes:
Running time: 1.8225100000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1814,83 5,19 99,99% 1336,69 3,82 73,65% -hsmw-highlight-process
2) 2800 338,83 0,12 18,67% 338,83 0,12 18,67% -hsmw-highlight-string
3) 2450 81,75 0,03 4,50% 81,75 0,03 4,50% -hsmw-highlight-check-path
4) 1400 39,80 0,03 2,19% 39,80 0,03 2,19% -hsmw-highlight-main-type
5) 350 9,74 0,03 0,54% 9,74 0,03 0,54% -hsmw-highlight-stack-pop
6) 350 8,02 0,02 0,44% 8,02 0,02 0,44% -hsmw-highlight-path-separators
7) 1 0,10 0,10 0,01% 0,10 0,10 0,01% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
|
2016-10-25 16:58:55 +02:00 |
|