cockroachdb / cockroachdb/cockroach

apd: decimal parsing can be string allocation heavy

Open
#96,818 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Decimal parsing involves numerous string operations:

- removing prefixes (+-)
- removing suffixes "e..."
- removing decimal, ie "45.123" -> "45123"

We should just convert the string to a []byte and do all the mutations on a copy and avoid all these allocations.

Jira issue: CRDB-24350

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.