Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch optimizes the `copy_cells` path for multi-fragment reads. The following benchmarks are for the multi-fragment read scenario discussed offline: ``` // Current Read time: 4.75082 secs * Time to copy result attribute values: 3.54192 secs > Time to read attribute tiles: 0.311707 secs > Time to unfilter attribute tiles: 0.370434 secs > Time to copy fixed-sized attribute values: 0.898421 secs > Time to copy var-sized attribute values: 0.954925 secs ``` ``` // With this patch Read time: 3.04627 secs * Time to copy result attribute values: 1.83972 secs > Time to read attribute tiles: 0.274928 secs > Time to unfilter attribute tiles: 0.38196 secs > Time to copy fixed-sized attribute values: 0.517415 secs > Time to copy var-sized attribute values: 0.461847 secs ``` For context, here are the benchmark results for the single-fragment read. The stats are similar with and without this patch: ``` Read time: 1.86883 secs * Time to copy result attribute values: 1.19411 secs > Time to read attribute tiles: 0.304055 secs > Time to unfilter attribute tiles: 0.351332 secs > Time to copy fixed-sized attribute values: 0.289661 secs > Time to copy var-sized attribute values: 0.142405 secs ``` This patch does three things: 1. Converts the `offset_offsets_per_cs` and `var_offsets_per_cs` in the var-sized path from a 2D array (vector<vector<uint64_t>>) to a 1D array (vector<uint64_t). The big win is construction and destruction time for the nested vector elements. 2. Partitions cell copying for both fixed and var-sized paths. The motivation is to reduce contention on the TBB threads and minimize time spent context switching between the individual cell slab copies. 3. Added a context cache for the fixed size path, similar to the existing var-sized context cache. Co-authored-by: Joe Maley <[email protected]>
- Loading branch information