-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
aerospike-record/record->map
(#61)
* Optimize `aerospike-record/record->map` 1. Avoid costly `(into {} ..)`, we can use the original `(.bins record)`. 2. No need for the `keys` function, since we can rely on the previously extracted `(.bins record)`. 3. `sanitize-bin-value` and `desanitize-bin-value` don't need to transform a single item to a vector, apply a transducer on it while copying it into a second array and extract the first item from the result, this can be unrolled into a single `(get ...)` function. 4. Use `Map`'s methods to determine if it is a single bin, and avoid costly vector comparison.
- Loading branch information
Showing
3 changed files
with
20 additions
and
16 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