Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added clear method on HashMapContext's variables and functions fields. (
#156) I've the below use case where numerous allocations are happening and hoping to reduce the impact of those re-allocations using the _clear_ method on the fields of `HashMapContext`: There are 1000s of transactions with each transaction having about 40 fields. Let's say field 5 and field 30 are sent from source as optional Boolean type (`Option<bool>`), which would mean certain transaction could have a boolean value and other transactions would have null value. I cannot use a default boolean value here. Since once the `HashMapContext` variables are created, their types can no longer be changed. Therefore, I have re-initiate the HashMapContext ```let mut context = HashMapContext::new();``` after every transaction and does the re-allocation.
- Loading branch information