-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues 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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels