um_threads) {
    chunk_size = data.len() / num_threads;
    chunks = [];

    i = 0;
    while (i &lt; num_threads) {
        start = i * chunk_size;
        end = (i == num_threads - 1) ? data.len() : (i + 1) * chunk_size;
        chunks += data.mid(start, end - start);
        i += 1;
    };

    /* Process chunks in parallel */
    results = chunks.map(op(chunk) { process_chunk(chunk); });

    /* Combine results */
    results.flatten();
};

/* Example usage */
large_dataset = generate_test_data(100000