Commit cbff634
authored
30% faster
If regex is so fast that it's worth using at the beginning of the function, why not use it for the stepping?
```
regex stepping x 280 ops/sec ±0.41% (83 runs sampled)
original x 214 ops/sec ±0.60% (85 runs sampled)
```1 parent b42947e commit cbff634
1 file changed
Lines changed: 10 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 33 | + | |
44 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
45 | 38 | | |
46 | | - | |
47 | | - | |
| 39 | + | |
| 40 | + | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
| |||
60 | 53 | | |
61 | 54 | | |
62 | 55 | | |
63 | | - | |
64 | | - | |
65 | 56 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 57 | + | |
| 58 | + | |
72 | 59 | | |
73 | 60 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 61 | + | |
78 | 62 | | |
0 commit comments