diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-09 08:35:03 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-09 08:35:03 +0200 |
| commit | 432f24319319fe040e142059eb83279c53f90ab8 (patch) | |
| tree | 5631eb0eb3a46d086070e8398d9080ff681133ac /simclist-1.5/perftest/ext.c | |
| parent | 5d34aff5888d3f0c624251f15bedb96c347978d6 (diff) | |
refactor 2
Diffstat (limited to 'simclist-1.5/perftest/ext.c')
| -rw-r--r-- | simclist-1.5/perftest/ext.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/simclist-1.5/perftest/ext.c b/simclist-1.5/perftest/ext.c deleted file mode 100644 index 8288b84..0000000 --- a/simclist-1.5/perftest/ext.c +++ /dev/null @@ -1,31 +0,0 @@ - -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <simclist.h> - -#define NELS 1000000 - -size_t szelem(const void *el) { - return sizeof(int); -} - -int main() { - list_t l; - int i; - - srandom(time(NULL)); - - list_init(&l); - list_attributes_copy(&l, szelem, 1); - - for (i = 0; i < NELS; i++) { - list_append(&l, &i); - } - - for (i = 0; i < 1000; i++) { - list_get_at(&l, random()%NELS); - } - - return 0; -} |
