BiteTheDDDDt opened a new issue #7998:
URL: https://github.com/apache/incubator-doris/issues/7998


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Description
   
   I tried to use `std::search` to replace custom search implement, have 100%+ 
faster on build with clang(also have some improve on gcc).
   
   ***before:***
   ```
   MySQL [ssb]> select sum(locate('LO',lo_orderpriority)) from lineorder;
   +---------------------------------------+
   | sum(locate('LO', `lo_orderpriority`)) |
   +---------------------------------------+
   |                             360039444 |
   +---------------------------------------+
   1 row in set (19.040 sec)
   
   MySQL [ssb]> select sum(locate('-',lo_orderpriority)) from lineorder;
   +--------------------------------------+
   | sum(locate('-', `lo_orderpriority`)) |
   +--------------------------------------+
   |                           1200075804 |
   +--------------------------------------+
   1 row in set (15.214 sec)
   
   MySQL [ssb]> select sum(locate('HIGH',lo_orderpriority)) from lineorder;
   +-----------------------------------------+
   | sum(locate('HIGH', `lo_orderpriority`)) |
   +-----------------------------------------+
   |                               359987466 |
   +-----------------------------------------+
   1 row in set (19.574 sec)
   ```
   
   ***after:*** 
   ```
   MySQL [ssb]> select sum(locate('LO',lo_orderpriority)) from lineorder;
   +---------------------------------------+
   | sum(locate('LO', `lo_orderpriority`)) |
   +---------------------------------------+
   |                             360039444 |
   +---------------------------------------+
   1 row in set (11.004 sec)
   
   MySQL [ssb]> select sum(locate('-',lo_orderpriority)) from lineorder;
   +--------------------------------------+
   | sum(locate('-', `lo_orderpriority`)) |
   +--------------------------------------+
   |                           1200075804 |
   +--------------------------------------+
   1 row in set (7.888 sec)
   
   MySQL [ssb]> select sum(locate('HIGH',lo_orderpriority)) from lineorder;
   +-----------------------------------------+
   | sum(locate('HIGH', `lo_orderpriority`)) |
   +-----------------------------------------+
   |                               359987466 |
   +-----------------------------------------+
   1 row in set (10.952 sec)
   ```
   
   ### Solution
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to