From cf975913131169a753acf0621e08e72bc40a91e2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 9 Feb 2022 07:31:41 -0800 Subject: benchtests: Add benches for memset with 0 value memset with zero as the value to set is by far the majority value (99%+ for Python3 and GCC). Add bench-memset-zero-large.c, bench-memset-zero-walk.c and bench-memset-zero.c to measure memset implementations for zeroing. Reviewed-by: Sunil K Pandey --- benchtests/bench-memset-zero-walk.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 benchtests/bench-memset-zero-walk.c (limited to 'benchtests/bench-memset-zero-walk.c') diff --git a/benchtests/bench-memset-zero-walk.c b/benchtests/bench-memset-zero-walk.c new file mode 100644 index 0000000000..dce4b43e06 --- /dev/null +++ b/benchtests/bench-memset-zero-walk.c @@ -0,0 +1,20 @@ +/* Measure memset functions for zeroing throughput with large data sizes. + Copyright (C) 2022 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define DO_MEMSET 1 +#include "bench-bzero-walk.c" -- cgit 1.4.1