Merge branch 'elliot/mem-bench' into 'main'

Memory Read Bandwidth for x86

See merge request course-asl-fastcode26/team70!52
This commit is contained in:
[Quy Anh] «Elliot» Nguyen
2026-06-03 22:37:08 +02:00
5 changed files with 170 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
block size: 1048576KiB
total size: 20480MiB
operation: read
scope: global
Initializing worker threads...
Threads started!
Total operations: 20 ( 37.08 per second)
20480.00 MiB transferred (37967.45 MiB/sec)
General statistics:
total time: 0.5378s
total number of events: 20
Latency (ms):
min: 25.99
avg: 26.87
max: 33.18
95th percentile: 28.16
sum: 537.47
Threads fairness:
events (avg/stddev): 20.0000/0.00
execution time (avg/stddev): 0.5375/0.00
+37
View File
@@ -0,0 +1,37 @@
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
block size: 1048576KiB
total size: 20480MiB
operation: read
scope: global
Initializing worker threads...
Threads started!
Total operations: 20 ( 37.63 per second)
20480.00 MiB transferred (38536.77 MiB/sec)
General statistics:
total time: 0.5299s
total number of events: 20
Latency (ms):
min: 25.63
avg: 26.48
max: 36.38
95th percentile: 27.66
sum: 529.61
Threads fairness:
events (avg/stddev): 20.0000/0.00
execution time (avg/stddev): 0.5296/0.00
+37
View File
@@ -0,0 +1,37 @@
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
block size: 1048576KiB
total size: 20480MiB
operation: read
scope: global
Initializing worker threads...
Threads started!
Total operations: 20 ( 37.35 per second)
20480.00 MiB transferred (38249.60 MiB/sec)
General statistics:
total time: 0.5339s
total number of events: 20
Latency (ms):
min: 26.01
avg: 26.68
max: 33.21
95th percentile: 27.66
sum: 533.54
Threads fairness:
events (avg/stddev): 20.0000/0.00
execution time (avg/stddev): 0.5335/0.00
+58
View File
@@ -0,0 +1,58 @@
rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o
/usr/bin/g++ main.cpp ./variants/variant_baseline.cpp -o main_baseline -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1
=== N_P=50 N_ITER=200 ===
W(n) per iteration: 183700.00 flops
Q(n) per iteration: 6512 bytes
I(n): 28.21 flops/byte
W(n): 36740000.00 flops
T(n): 27372765.00 cycles
P(n): 1.34 flops/cycle
=== N_P=100 N_ITER=200 ===
W(n) per iteration: 727400.00 flops
Q(n) per iteration: 12912 bytes
I(n): 56.34 flops/byte
W(n): 145480000.00 flops
T(n): 107682440.00 cycles
P(n): 1.35 flops/cycle
=== N_P=200 N_ITER=200 ===
W(n) per iteration: 2894800.00 flops
Q(n) per iteration: 25712 bytes
I(n): 112.59 flops/byte
W(n): 578960000.00 flops
T(n): 434952380.00 cycles
P(n): 1.33 flops/cycle
=== N_P=500 N_ITER=200 ===
W(n) per iteration: 18037000.00 flops
Q(n) per iteration: 64112 bytes
I(n): 281.34 flops/byte
W(n): 3607400000.00 flops
T(n): 2803955380.00 cycles
P(n): 1.29 flops/cycle
=== N_P=1000 N_ITER=200 ===
W(n) per iteration: 72074000.00 flops
Q(n) per iteration: 128112 bytes
I(n): 562.59 flops/byte
W(n): 14414800000.00 flops
T(n): 11379685260.00 cycles
P(n): 1.27 flops/cycle
=== N_P=2000 N_ITER=200 ===
W(n) per iteration: 288148000.00 flops
Q(n) per iteration: 256112 bytes
I(n): 1125.09 flops/byte
W(n): 57629600000.00 flops
T(n): 46349779000.00 cycles
P(n): 1.24 flops/cycle
=== N_P=5000 N_ITER=200 ===
W(n) per iteration: 1800370000.00 flops
Q(n) per iteration: 640112 bytes
I(n): 2812.59 flops/byte
W(n): 360074000000.00 flops
T(n): 312436846520.00 cycles
P(n): 1.15 flops/cycle
+1
View File
@@ -0,0 +1 @@
sudo sysbench memory --memory-block-size=1G --memory-total-size=20G --memory-oper=read run