|
Ran
|
Files
252
|
Run time
12s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/stedolan/jq/commit/<a class=hub.com/stedolan/jq/commit/9a4576e7567dd38b91f28592b47eb6dafe0c4332">9a4576e75<a href="https://github.com/stedolan/jq/commit/9a4576e7567dd38b91f28592b47eb6dafe0c4332">">Revert &quot;reduce: handle empty updates (fix #1313)" This reverts commit </a><a class="double-link" href="https://github.com/stedolan/jq/commit/<a class="double-link" href="https://github.com/stedolan/jq/commit/e24af3c78e78a3aab05a2800d825d56f1d842b1b">e24af3c78</a>">e24af3c78</a><a href="https://github.com/stedolan/jq/commit/9a4576e7567dd38b91f28592b47eb6dafe0c4332">. While the semantics are desirable, there is no way to implement them efficiently. The reason is that in order to handle backtracking (empty) from the state update expression, we have to retain a reference to the reduction state value in order to restore it upon backtracking. Retaining a reference to the reduction state kills performance by causing lots of additional memory allocations and garbage because the input to the update expression will always have at least two references, thus no changes to it can be done in-place, and all changes end up being CoW changes. Avoiding this is the very reason for the LOADVN instruction (leaving `null` in the variable loaded from).
5146 of 6079 relevant lines covered (84.65%)
6821776.3 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|