linux-sysprog · beginner · ~15 min
Estimate perfect-scaling runtime.
Implement long ideal_runtime(long serial_ms, int threads) returning the work split evenly across threads (ceiling division), or serial_ms if threads <= 1.
long ideal_runtime(long serial_ms, int threads) {
/* TODO */
return serial_ms;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.