pingcap / pingcap/tidb

global sort writer: is it worth to use SliceLocation rather than directly store the slice?

Open
#48,935 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

`SliceLocation` uses less memory and is more GC friendly than `[]byte`. However, in every comparison of sorting it introduce extra overhead
![image](https://github.com/pingcap/tidb/assets/1689766/0ca9a9f8-1a24-4fe8-aced-ec0f23b15e58)

Need to test if it's really worth it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.