pingcap / pingcap/tiflash

improve performance for round(col_floating, frac)

Open
#9,860 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/compute type/enhancement
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Enhancement

For now, TiDBFloatingRound use std::pow to compute base, which may hurt performance. Should use pre-computed array, like TiDBDecimalRound and TiDBIntegerRound, check https://github.com/pingcap/tiflash/blob/0001db37db3ccf001c897f32b116625eef8d3054/dbms/src/Functions/FunctionsRound.h#L1032

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect dbms/src/Functions/FunctionsRound.h, especially TiDBFloatingRound and the analogous TiDBDecimalRound and TiDBIntegerRound implementations. Compare the linked historical version and verify that floating-point round uses a precomputed base array instead of std::pow while preserving existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, performance
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.