hexdump performance test, part 1

spoiler alert: it's slow as molasses

part 2 will be presented at a later date

(yes, please don't fill 8GB of memory with
random data and hexdump it)

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-29 13:23:31 +01:00
parent cec3de5c9e
commit b70ee41c5c
3 changed files with 24 additions and 6 deletions
+3 -2
View File
@@ -179,7 +179,6 @@ scatn(ssize_t sc, const char **sv,
size_t max, char **rval)
{
int saved_errno = errno;
char *final = NULL;
char *rcur = NULL;
char *rtmp = NULL;
@@ -192,7 +191,9 @@ scatn(ssize_t sc, const char **sv,
for (i = 0; i < sc; i++) {
if (i == 0) {
if (if_err(sv[i] == NULL, EFAULT))
goto err;
else if (i == 0) {
if (sdup(sv[0], max, &final) < 0)
goto err;
continue;