Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename and simplify store_list. (#5751)
### Problem 1. `store_list` creates tuples rather than lists 2. It has an unused `merge` parameter (from when we used to use `store_list` to flatten lists). 3. It requires more allocations than are strictly necessary because it takes a `Vec` and then copies it to change its shape. ### Solution Rename to `store_tuple`, remove the `merge` parameter, and change the signature to taking a `&[Value]`, which allows for use of arrays on the stack, as well as direct usage of `Vec<Value>`, which we have in most (all?) cases. ### Result Fewer allocations, simpler API.
- Loading branch information
Stu Hood
committed
Apr 26, 2018
1 parent
1acaeec
commit a8548cc
Showing
4 changed files
with
19 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters