Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5366

Teaching and learning resources • Re: Advent of Code 2023

$
0
0
The code posted above is slightly different than what's on Github
Yes, the Github version is multithreaded which doesn't work on the 32 bit OS running the Pi 0 (doesn't support 64 bit atomics). This is an earlier single threaded version, using the same logic.

Surprising that the Ryzen 4650 only achieves the same performance as the Pi5.

On Ryzen 7 3700X, with 4 threads I get

Code:

--- Day 12: Hot Springs ---Part 1  - 7694Part 2  - 5071883216318Elapsed - 10.043 ms.
I wonder if differences with the puzzle input could account for the longer times.

Also, I optimized with -O3 but didn't specify any architecture specific flags.
For a point of reference, I turned the clock speed back up to 1 GHz on the Pi Zero. After ironing out some instabilities related to low voltage I ended up with

Code:

$ ./lurk12 # Pi Zero 1000 MHz--- Day 12: Hot Springs ---Part 1  - 7694Part 2  - 5071883216318Elapsed - 1221.5 ms.$ ./lurk12--- Day 12: Hot Springs ---Part 1  - 7694Part 2  - 5071883216318Elapsed - 1102.53 ms.$ ./lurk12--- Day 12: Hot Springs ---Part 1  - 7694Part 2  - 5071883216318Elapsed - 1064.17 ms.$ suPassword:# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governorperformance# vcgencmd measure_clock armfrequency(48)=1000000000
Since

1064.17/559.543 = 1.9

something is inexplicably slow here.

Statistics: Posted by ejolson — Thu Jan 11, 2024 3:38 am



Viewing all articles
Browse latest Browse all 5366

Trending Articles