How to compare GPU and CPU performance when calculating fractals?

428 Views Asked by At

I've encountered this problem. I need to compare CPU and GPU performance when calculating fractal using WebCL, CUDA or OpenCL. How can I do this?

Thank you.

1

There are 1 best solutions below

2
On BEST ANSWER

You can either time how long it takes to run a fixed number of iterations, or measure how many iterations are completed in a fixed time.

Or you can do something fancier such as doing a fixed amount of work, but if it completes too quickly such that timing imprecision is too large relatively, increase the work by a factor and repeat.

In any case, you can then calculate throughput as:

work_done / time_needed