mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Add more missing C / C++ headers
This commit is contained in:
parent
b9dc74b672
commit
8dd4ec68d0
152 changed files with 30711 additions and 6267 deletions
|
@ -19,8 +19,8 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
@ -68,11 +68,18 @@ TEST(bzero, hug) {
|
|||
BENCH(memset, bench) {
|
||||
int n, max = 8 * 1024 * 1024;
|
||||
char *volatile p = gc(malloc(max));
|
||||
|
||||
EZBENCH_N("memset", 0, memset(p, -1, 0));
|
||||
for (n = 2; n <= max; n *= 2) {
|
||||
EZBENCH_N("memset", n - 1, memset(p, -1, n - 1));
|
||||
EZBENCH_N("memset", n, memset(p, -1, n));
|
||||
}
|
||||
|
||||
EZBENCH_N("memset16", 0, memset16((char16_t *)p, -1, 0));
|
||||
for (n = 2; n <= max; n *= 2) {
|
||||
EZBENCH_N("memset16", n, memset16((char16_t *)p, -1, n / 2));
|
||||
}
|
||||
|
||||
EZBENCH_N("bzero", 0, bzero(p, 0));
|
||||
for (n = 2; n <= max; n *= 2) {
|
||||
EZBENCH_N("bzero", n - 1, bzero(p, n - 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue