Revert "fix: reduce/foreach state variable should not be reset each iteration" (#3349)
This reverts 96e8d893c1. The change
introduced a serious performance regression as reported in #3345.
This commit is contained in:
1 parent
a587ddc5a3
commit
edbc1da809
2 files changed
+2
-10
No files matched your search
@@ -358,10 +358,6 @@ null
|
||||
[1,2,3]
|
||||
[1,3,6]
|
||||
|
||||
[foreach range(5) as $x (0; .+$x | select($x!=2); [$x,.])]
|
||||
null
|
||||
[[0,0],[1,1],[3,4],[4,8]]
|
||||
|
||||
[limit(3; .[])]
|
||||
[11,22,33,44,55,66,77,88,99]
|
||||
[11,22,33]
|
||||
@@ -920,10 +916,6 @@ reduce . as $n (.; .)
|
||||
null
|
||||
null
|
||||
|
||||
reduce range(5) as $x (0; .+$x | select($x!=2))
|
||||
null
|
||||
8
|
||||
|
||||
# Destructuring
|
||||
. as {$a, b: [$c, {$d}]} | [$a, $c, $d]
|
||||
{"a":1, "b":[2,{"d":3}]}
|
||||
|
||||
Reference in new issue
Block a user