Allow optimizing memcpy and memset where possible

Modern C runtimes have well optimized memset and memcpy, so use those instead of dispatching into SDL's versions. In addition, some compilers can analyze memset and memcpy calls and directly turn them into optimized assembly.
This commit is contained in:
Sam Lantinga 2024-01-20 08:12:11 -08:00
parent 8d25c2d260
commit 7a069cc4b0
16 changed files with 390 additions and 220 deletions

View file

@ -26,6 +26,9 @@
#if SDL_DYNAMIC_API
#define SDL_DYNAMIC_API_ENVVAR "SDL3_DYNAMIC_API"
#define SDL_SLOW_MEMCPY
#define SDL_SLOW_MEMMOVE
#define SDL_SLOW_MEMSET
#ifdef HAVE_STDIO_H
#include <stdio.h>