matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.74k stars 272 forks source link

[Bug]: Inefficient code implementation in strToSigned #15569

Open zhangxu19830126 opened 4 months ago

zhangxu19830126 commented 4 months ago

Is there an existing issue for the same bug?

Branch Name

1.0-dev main

Commit ID

latest

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

企业微信截图_fab9277a-684a-4db4-8d89-ac53fb95a4a9

Expected Behavior

No response

Steps to Reproduce

Baidu Online environments take up too much cpu

Additional information

No response

m-schen commented 4 months ago
企业微信截图_2cfe7baf-c5a7-4717-be10-597be3553bde 企业微信截图_21fb69ae-33a9-4942-b3ea-6f7ef2750c9f

case里的情况只是单纯数据量很大而已(可以通过图中的函数所占用的时间得出该结论),优化这个函数提升不会很大的。

zhangxu19830126 commented 4 months ago
image

看代码是这里的问题,可能和火焰图对不上,但是火焰图帮助我们找到了图上这里的代码实现不合理。

zhangxu19830126 commented 4 months ago

应该直接parse binary的数字,和parse string int的方式的性能差异:

zhangxu19830126 commented 4 months ago
image
m-schen commented 4 months ago

https://github.com/m-schen/matrixone/tree/rewrite-cast

通过该分支跟踪,暂时还没有空处理这个。

m-schen commented 1 month ago

近期无法开展这个工作

m-schen commented 1 month ago

近期没有投入这个

m-schen commented 1 month ago

同上一个回复,且先变成s1,优先级很低。