Performance in Mandelbrot Set Computation
I want to have a nice poster of a Mandelbrot set, say 75×50 cm². At 300 DPI printing resolution, I need to compute a lot of pixels:
I want to have a nice poster of a Mandelbrot set, say 75×50 cm². At 300 DPI printing resolution, I need to compute a lot of pixels:
Die CPU in meinem Laptop wird recht schnell 96 °C warm. Ich wollte mal schauen, wie stark es dann gedrosselt wird. Also habe ich es mit mprime ausgelastet und man kann gut sehen, wie der durchschnittliche Takt anfängt von 3 GHz abzuweichen, sobald die Temperatur so 90 °C erreicht hat:
When you have an array with some data structure that you would like to sort, you are looking for a sorting algorithm in the standard library.
There are a couple ways to measure the real (wall) time that some part of the
code has used. I know the standard clock()
from time.h
and all the chrono
from C++11. Then MPI and OpenMP have their own routines as well.
I know of two ways to represent a matrix in plain C. One is to have arrays in
arrays. So the matrix is an array, where each entry contains a row of the
matrix. You access the entries with something like matrix[row][col]
.
Someone said that using pow(x, 2)
is always more inefficient than using
x * x
. Well, there are two things to remember:
A while ago, I had an intriguing conversation with somebody who disclosed some secrets about PHP. He told me that he does not use functions but rather include files, since a function file would have to be included and since something has to be included anyway, there was no need for the function after all.