Though we don't require tuples to have any memory alignment based on the comment in https://github.com/apache/impala/blob/81d5377c27f1940235db332e43f1d0f073cf3d2f/be/src/runtime/tuple.h#L61-L63 , but I do believe we sort slots to get a packed and aligned memory layout for the tuples in most cases. CPU operations on aligned addresses are more efficient than operations on unaligned addresses.
BR, Zoltan On Mon, Feb 8, 2021 at 10:12 AM 许益铭 <x1860...@gmail.com> wrote: > why tuple memory need to be sorted by slot size? is has any optimize? >