Benchmarks: my second thermal erosion
Introduction
This benchmark session has confirmed what I’ve introduced in the previous post, the new erosion algorithm is really fast!
As usual, all the test are based on 1024×1024 maps, the GPU version uses 16-bits floating point textures.
GPU version
The following data are the execution times needed to complete a different number of iterations of the erosion phase, for each group of iterations you can see the slowest, the average and the fastest time on 10 tests.
iterations = 10 -> min = 288 ms. - avg = 292 ms. - max = 295 ms.
iterations = 30 -> min = 413 ms. - avg = 416 ms. - max = 420 ms.
iterations = 50 -> min = 540 ms. - avg = 541 ms. - max = 544 ms.
iterations = 70 -> min = 665 ms. - avg = 666 ms. - max = 668 ms.
iterations = 100 -> min = 851 ms. - avg = 853 ms. - max = 856 ms.
As it’s possible to notice the times are not linear, but they grow slowly.
The new algorithm is about 55~65% faster than the previous one, this is a huge improvement!
CPU version
The program is written in C language.
The following data are the average execution times needed to complete a different number of iterations of the erosion phase.
iterations = 1 -> 226 ms.
iterations = 10 -> 2252 ms.
iterations = 50 -> 11182 ms.
The CPU version is slightly faster (about 2%) than the CPU version of the previous algorithm.