// playground

Research Playground

1. Read the baseline code and task info. 2. Write your hypothesis — what to change and why. 3. Click Run and watch the agent iterate: propose, test, measure, revise.

starter tasks (free tier)
solve.c (baseline)c
1#include "solve.h"
2#include <stdlib.h>
3#include <string.h>
4
5// Comparison function for qsort
6static int compare_uint32(const void *a, const void *b) {
7 uint32_t va = *(const uint32_t *)a;
8 uint32_t vb = *(const uint32_t *)b;
9 if (va < vb) return -1;
10 if (va > vb) return 1;
11 return 0;
12}
13
14// Baseline: stdlib qsort on 50M uint32 values
15// This is O(n log n) but with high constant factors
16// due to comparison function pointer overhead and
17// poor cache locality during partitioning.
18void radix_sort(uint32_t *data, size_t n) {
19 qsort(data, n, sizeof(uint32_t), compare_uint32);
20}

Free tier uses Haiku 4.5. Select a different model and bring your own API key for stronger results.