You will write three small functions for the simple model of performance: one instruction in each clock cycle on each core.
Your tasks.
cycles_per_second, return the number of cycles each second for a clock speed given in GHz.task_time, return the time in seconds for a task of cycles cycles on one core.time_on_cores, return the time when the fraction shared of the work is split equally between cores cores and the rest runs on one core.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…