[MDEV-7947] my_charset_same: strcmp() takes 0.37% in OLTP RO Created: 2015-04-09  Updated: 2020-09-25  Resolved: 2020-07-23

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.1
Fix Version/s: 10.5.5

Type: Bug Priority: Major
Reporter: Sergey Vojtovich Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Epic Link: Performance: micro optimizations

 Description   

Data comes from Sandy Bridge system running sysbench OLTP RO in 1 thread against 1 table.

Call graphs:

-   0.37%  mysqld  libc-2.15.so
   - __strcmp_sse42
      + 43.10% Protocol::store_string_aux(char const*, unsigned long, charset_info_st const*, charset_info_st const*)
      + 27.26% ha_innobase::change_active_index(unsigned int)
      + 20.46% open_table(THD*, TABLE_LIST*, Open_table_context*)
      + 7.66% ha_innobase::records_in_range(unsigned int, st_key_range*, st_key_range*)
      + 1.52% Item::set_name(char const*, unsigned int, charset_info_st const*)

Protocol::store_string_aux() calls my_charset_same(), which does strcmp(). This can be optimized out.



 Comments   
Comment by Michael Widenius [ 2020-07-23 ]

Coding and testing. Fixing issues found by buildbot.
Pushed into 10.5 tree (Too big change to earlier versions)

Generated at Thu Feb 08 07:23:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.