influxdata / influxdata/influxdb
performance degradation (2x-10x) when using math builtin functions
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Short summary of the feature.
__Current behavior:__
For example, when mapping over a stream of with math.sqrt and math.pow, slow down by (2x-10x). I observed that it takes an additional ~0.20s per `math` function calls. When I used x*x, instead of math.pow(), it would be about 0.20s faster.
__Desired behavior:__
At least match the performance of natively support math operations.
__Use case:__
Why is this important (helps with prioritizing requests)?
speed for high read and high cardinality computation to help with real-time data analysis. The alternative is to query raw data and compute it in code.
Disclaimer: I am new to Influx and might just not be using it right.
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by reproducing a stream mapped with math.sqrt or math.pow and compare it with equivalent native arithmetic such as x*x; investigate the performance difference with a benchmark or profiler. Done means math builtin calls no longer show the reported 2x-10x degradation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100