/* Benchmark C Vere cue on solid pill */ #include #include #include #include /* Minimal standalone cue benchmark - reads file and times it */ double get_time() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec + tv.tv_usec / 1000000.0; } int main() { const char *filename = "solid.pill"; FILE *f = fopen(filename, "rb"); if (!f) { printf("Error: cannot open %s\n", filename); return 1; } /* Get file size */ struct stat st; fstat(fileno(f), &st); size_t file_size = st.st_size; /* Read file */ unsigned char *data = malloc(file_size); fread(data, 1, file_size, f); fclose(f); printf("File: %s (%.1f MB)\n", filename, file_size / 1024.0 / 1024.0); printf("Timing cue operation...\n\n"); /* We would call u3s_cue_xeno here if linked with libvere * For now just report file read time */ printf("Note: This is a placeholder. To get real C Vere cue timing:\n"); printf(" 1. Build vere runtime\n"); printf(" 2. Add timing to vere/pkg/vere/boot_tests.c\n"); printf(" 3. Load solid.pill instead of ivory\n\n"); printf("Based on C Vere source, cue should take ~0.1-1 second for 8.7MB\n"); printf("Our OCaml implementation takes >300 seconds (300x slower!)\n"); free(data); return 0; }