mariadb/mysys
Daniel Black d405bee058 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
2018-05-07 16:04:01 +03:00
..
array.c spelling fixes 2017-03-07 13:38:06 +04:00
base64.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
ChangeLog
charset-def.c MDEV-10877 xxx_unicode_nopad_ci collations 2016-09-23 14:19:07 +04:00
charset.c MDEV-11255 LDML: allow defining 2-level UCA collations 2016-11-08 20:57:19 +04:00
checksum.c MDEV-9872: New Power8 crc32(ieee) optimized functions 2016-08-05 11:50:46 +04:00
CMakeLists.txt Add checking of correct likely/unlikely 2018-05-07 00:07:32 +03:00
errors.c Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
file_logger.c Optimize performance schema likely/unlikely 2018-05-07 00:07:33 +03:00
get_password.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
guess_malloc_library.c Fixed compiler warnings in guess_malloc_library 2018-01-15 16:44:44 +02:00
hash.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
lf_alloc-pin.c Fix typos in some comments 2017-12-18 11:16:47 +04:00
lf_dynarray.c MDEV-7437 remove suport for "atomics" with rwlocks 2015-01-13 10:15:21 +01:00
lf_hash.c Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
list.c MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT. 2017-09-28 17:20:46 +00:00
ma_dyncol.c Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
mf_arr_appstr.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mf_cache.c misc IO_CACHE cleanups 2015-06-02 18:53:37 +02:00
mf_dirname.c Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
mf_fn_ext.c spelling fixes 2017-03-07 13:38:06 +04:00
mf_format.c Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
mf_getdate.c Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
mf_iocache.c Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
mf_iocache2.c Fixed crashing bug in mysqlbinlog 2018-01-03 01:05:25 +02:00
mf_keycache.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
mf_keycaches.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_loadpath.c Bug# 20376760: STACK-BUFFER-OVERFLOW WITH LONG PATHS TO CERTAIN VARIABLES 2015-06-24 17:48:46 +05:30
mf_pack.c MDEV-4503 : Installation fails if TEMP directory contains "~" subdirectory. 2013-06-17 19:18:14 +02:00
mf_path.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_qsort.c MySQL-5.5.36 merge 2014-02-17 11:00:51 +01:00
mf_qsort2.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mf_radix.c 5.5 merge 2014-02-25 16:04:35 +01:00
mf_same.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mf_sort.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_soundex.c MySQL-5.5.36 merge 2014-02-17 11:00:51 +01:00
mf_tempdir.c 5.5 merge 2014-02-25 16:04:35 +01:00
mf_tempfile.c Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION 2013-12-18 11:05:18 +01:00
mf_unixpath.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_wcomp.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mulalloc.c Fixed compiler warnings and test failures found by buildbot 2016-06-24 02:25:14 +03:00
my_access.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_addr_resolve.c Merge branch '10.1' into 10.2 2018-04-10 17:43:18 +03:00
my_alarm.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
my_alloc.c Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-08 19:06:25 +04:00
my_atomic_writes.c Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
my_basename.c Enusure that my_global.h is included first 2017-08-24 01:05:44 +02:00
my_bit.c MDEV-11901 : MariaRocks on Windows 2017-02-01 21:27:13 +00:00
my_bitmap.c Ensure that map->mutex is reset in my_bitmap_init 2018-03-29 14:20:11 +03:00
my_chmod.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_chsize.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_compare.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
my_compress.c spelling fixes 2017-03-07 13:38:06 +04:00
my_conio.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_context.c Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
my_copy.c Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
my_create.c Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
my_default.c Merge 10.2 into 10.3 2018-04-24 20:59:57 +03:00
my_delete.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_div.c cleanup: my_register_filename() 2017-02-27 12:35:10 +01:00
my_dlerror.c make sql_udf.cc to shorten dlerror() messages 2017-03-10 18:21:26 +01:00
my_error.c cleanup: my_printf_error(ER_xxx, ER(ER_xxx), ... ) 2016-12-12 20:27:28 +01:00
my_file.c Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
my_fopen.c my_fdopen: list all args in comment 2018-03-07 17:25:08 +04:00
my_fstream.c MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT. 2017-09-28 17:20:46 +00:00
my_gethwaddr.c Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
my_getncpus.c 5.3 merge 2012-01-13 15:50:02 +01:00
my_getopt.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
my_getpagesize.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_getsystime.c MDEV-15694 Windows : use GetSystemTimePreciseAsFileTime if available for high resolution time 2018-04-01 14:38:45 +00:00
my_getwd.c MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT. 2017-09-28 17:20:46 +00:00
my_init.c Add checking of correct likely/unlikely 2018-05-07 00:07:32 +03:00
my_largepage.c MDEV-13785: move defination HAVE_LARGE_PAGES -> HAVE_LINUX_LARGE_PAGES 2018-03-29 18:55:18 +04:00
my_lib.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_libwrap.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
my_likely.c Optimize performance schema likely/unlikely 2018-05-07 00:07:33 +03:00
my_lock.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_lockmem.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_malloc.c Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-01-29 12:44:20 +04:00
my_memmem.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_mess.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
my_mkdir.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_mmap.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_new.cc MDEV-13459 Warnings, when compiling with gcc-7.x 2017-10-17 07:37:39 +02:00
my_once.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_open.c Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
my_port.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_pread.c spelling fixes 2017-03-07 13:38:06 +04:00
my_pthread.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_quick.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_rdtsc.c MDEV-8692 prefschema test failures on ARM (on Debian build system) 2017-07-17 12:34:58 +02:00
my_read.c Made IO_CACHE safe for reading big blocks (> 2G) 2017-12-29 13:38:55 +02:00
my_redel.c spelling fixes 2017-03-07 13:38:06 +04:00
my_rename.c MDEV-5612 - my_rename() deletes files when it shouldn't 2014-02-26 12:55:28 +04:00
my_rnd.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_safehash.c MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT. 2017-09-28 17:20:46 +00:00
my_safehash.h Correct FSF address 2017-03-10 18:21:29 +01:00
my_seek.c MDEV-4011 Added per thread memory counting and usage 2013-01-23 16:16:14 +01:00
my_setuser.c MDEV-11676 Starting service with mysqld_safe_helper fails in SELINUX "enforcing" mode 2017-01-04 13:38:03 +01:00
my_sleep.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_static.c MDEV-13785: move defination HAVE_LARGE_PAGES -> HAVE_LINUX_LARGE_PAGES 2018-03-29 18:55:18 +04:00
my_static.h Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_symlink.c Merge remote-tracking branch '5.5' into 10.0 2017-06-20 12:31:17 +03:00
my_symlink2.c MDEV-12230 include/my_sys.h:600:43: error: unknown type name ‘PSI_file_key’" when -DWITHOUT_SERVER=1 2017-04-20 16:36:23 +02:00
my_sync.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_thr_init.c Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
my_timer_cycles.il Updated/added copyright headers 2011-06-30 17:46:53 +02:00
my_uuid.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_wincond.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
my_windac.c Windows, compiling : reenable warning C4996 (deprecated functions) 2018-02-07 20:17:38 +00:00
my_winerr.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_winfile.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
my_winthread.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
my_write.c Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
mysys_priv.h Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
psi_noop.c Optimize performance schema likely/unlikely 2018-05-07 00:07:33 +03:00
ptr_cmp.c mysys: disable "optimized" memcpy from 18 years ago 2018-05-07 16:04:01 +03:00
queues.c spelling fixes 2017-03-07 13:38:06 +04:00
safemalloc.c Re-enable 'S' for --debug (sf_sanity checking for each call) 2017-12-22 14:56:58 +02:00
stacktrace.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
string.c MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data) 2018-02-06 12:55:58 +00:00
test_charset.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
test_dir.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
test_thr_mutex.c Correct FSF address 2017-03-10 18:21:29 +01:00
test_xml.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
testhash.c Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
thr_alarm.c Make possible to use clang on Windows (clang-cl) 2018-02-20 21:17:36 +00:00
thr_lock.c Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00
thr_mutex.c Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
thr_rwlock.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
thr_timer.c MDEV-7177 - Server hangs on shutdown after InnoDB error (main.plugin_loaderr 2015-02-05 13:58:30 +04:00
tree.c Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-02-04 18:40:06 +04:00
typelib.c Merge remote-tracking branch 'origin/10.1' into 10.2 2017-12-22 12:23:39 +02:00
waiting_threads.c Merge bb-10.2-ext into 10.3 2017-12-12 09:57:17 +02:00
wqueue.c Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00