matiTechno / asm-fractal

me learning x86-64 linux assembly - the goal of the project is to render a fractal to a file using multiple threads and without any dependencies; +AVX2 version
2 stars 0 forks source link

multithreading performance 4000x3000px render #2

Open matiTechno opened 5 years ago

matiTechno commented 5 years ago

my cpu stats, lscpu otuput

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       39 bits physical, 48 bits virtual
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping:            10
CPU MHz:             700.607
CPU max MHz:         3400.0000
CPU min MHz:         400.0000
BogoMIPS:            3601.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-7

commit: e04e15d68a9ed0031e97531a93781f24cd90b423 (tested version) Measurements were done with time program (real time statistic). I ran each configuration couple of times and chose the best result. Time is reported in seconds. I went with clang because I have image corruptions with gcc -O3 build.

number of threads assembly clang clang -O3
1 25.889 29.696 17.054
2 13.743 15.117 8.589
4 7.513 7.505 4.356
8 4.200 5.386 2.362
16 4.204 5.386 2.355
128 4.213 5.381 2.359
matiTechno commented 5 years ago

gcc version: gcc (GCC) 8.2.1 20181127 clang version: clang version 7.0.1 (tags/RELEASE_701/final); x86_64-pc-linux-gnu; posix