mysys: disable "optimized" memcpy from 18 years ago
MDEV-15843 mysys: remove optimized memcpy from 18 years ago While this code has remained dormant for 18 years, libc implementers have used assembly features to gain improvements using achitecture features optimized and by the buffer length like: * https://svnweb.freebsd.org/base/head/lib/libc/amd64/string/memcmp.S * https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aarch64/memcmp.S * https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/powerpc64/memcpy.S From an sysbench-1.0.6 oltp_read_only test on binary charset table: x86_64: was ptr_compare_0: perf report -g --no-children: + 3.37% mysqld mysqld [.] hp_rec_hashnr + 3.15% mysqld libc-2.26.so [.] __memmove_avx_unaligned_erms + 2.73% mysqld mysqld [.] row_search_mvcc + 1.97% mysqld mysqld [.] rec_get_offsets_func + 1.24% mysqld mysqld [.] ptr_compare_0 + 1.14% mysqld mysqld [.] my_qsort2 After: __memcmp_avx2_movbe + 3.42% mysqld mysqld [.] hp_rec_hashnr + 2.96% mysqld libc-2.26.so [.] __memmove_avx_unaligned_erms + 2.91% mysqld mysqld [.] row_search_mvcc + 2.13% mysqld mysqld [.] rec_get_offsets_func + 1.18% mysqld libc-2.26.so [.] __memcmp_avx2_movbe + 1.04% mysqld mysqld [.] evaluate_join_record + 1.02% mysqld mysqld [.] my_qsort2 Power9: Before: ptr_compare_0 + 4.24% mysqld mysqld [.] _Z15row_search_mvccPh15page_cur_mode_tP14row_prebuilt_tmm + 2.18% mysqld mysqld [.] hp_rec_hashnr + 2.07% mysqld mysqld [.] _Z20rec_get_offsets_funcPKhPK12dict_index_tPmbmPP16mem_block_info_t + 1.60% mysqld mysqld [.] _ZL20evaluate_join_recordP4JOINP13st_join_tablei + 1.20% mysqld mysqld [.] _ZN11ha_innobase13general_fetchEPhjj + 1.05% mysqld mysqld [.] _ZN17Item_func_between15val_int_cmp_intEv + 0.92% mysqld mysqld [.] _Z40row_sel_field_store_in_mysql_format_funcPhPK17mysql_row_templ_tPKhm + 0.91% mysqld mysqld [.] _ZNK10Item_param6PValue7val_intEPK19Type_std_attributes + 0.84% mysqld mysqld [.] ptr_compare_0 After: __memcmp_power8 + 2.29% mysqld mysqld [.] _Z15row_search_mvccPh15page_cur_mode_tP14row_prebuilt_tmm + 1.32% mysqld mysqld [.] hp_rec_hashnr + 1.18% swapper [kernel.kallsyms] [k] power_enter_stop + 1.12% mysqld mysqld [.] _Z20rec_get_offsets_funcPKhPK12dict_index_tPmbmPP16mem_block_info_t + 0.87% mysqld mysqld [.] _ZL20evaluate_join_recordP4JOINP13st_join_tablei + 0.87% mysqld [kernel.kallsyms] [k] ___bpf_prog_run + 0.76% mysqld libc-2.26.so [.] __memcmp_power8 + 0.68% mysqld mysqld [.] _ZN11ha_innobase13general_fetchEPhjj + 0.58% mysqld mysqld [.] _ZN17Item_func_between15val_int_cmp_intEv
Showing
Please register or sign in to comment