mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2235 (markdown)
@@ -22,7 +22,7 @@ For example, `(cmd)`, `(cmd;)` and `( cmd )` are all valid, but `{cmd}`, `{cmd;}
|
|||||||
|
|
||||||
Here's a small benchmark showing that the subshell version is more than 100x slower:
|
Here's a small benchmark showing that the subshell version is more than 100x slower:
|
||||||
|
|
||||||
```
|
```console
|
||||||
$ i=0; time for i in {1..10000}; do ([ "$x" ] || [ "$y" ]) && [ "$z" ]; done
|
$ i=0; time for i in {1..10000}; do ([ "$x" ] || [ "$y" ]) && [ "$z" ]; done
|
||||||
real 0m7.122s
|
real 0m7.122s
|
||||||
user 0m4.204s
|
user 0m4.204s
|
||||||
@@ -34,8 +34,6 @@ user 0m0.055s
|
|||||||
sys 0m0.000s
|
sys 0m0.000s
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
Reference in New Issue
Block a user