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

Teaching and learning resources • Re: Advent of Code 2023

$
0
0
For now I'm claiming that the slow algorithm makes a better test of Julia on the Pi Zero.
On a Pi Zero I obtained

Code:

julia> include("day21.jl") # Pi Zero 700 MHzAdvent of Code 2023 Day 21 Step CounterPart 1 There are 3682 reachable garden plots.Part 2 On the infinite grid 609012263058042 are reachable.Total execution time 9503.550585268 seconds.
Since

9504 / 274.8 = 34.58

it would appear the single thread speed of a Pi Zero is about 34 times slower than the Ryzen 4650. Even though 2.6 hours does not meet the 15 second cutoff, I'm happy that Julia works.

For reference the single thread Pi chart results

Code:

$ ./pichart-serial # Ryzen 4650pichart -- Raspberry Pi Performance Serial version 40Prime Sieve          P=14630843 Workers=2 Sec=0.617957 Mops=1511.96Merge Sort           N=16777216 Workers=1 Sec=1.50172 Mops=268.128Fourier Transform    N=4194304 Workers=2 Sec=0.480896 Mflops=959.403Lorenz 96            N=32768 K=16384 Workers=2 Sec=0.123757 Mflops=26028.7My Computer has Raspberry Pi ratio=50.0872Making pie charts...done.
upon dividing the average of the Prime Sieve and Merge Sort computational speeds, suggest integer performance of the Zero is only

sqrt(1512*268.1) / sqrt(51.00*25.43) = 17.68

times slower than the Ryzen 4650 on the integer portion of the Pi chart.

I wonder if the additional factor of two when working with Julia is due to the threaded nature of the garbage collector and just-in-time compiler.

Statistics: Posted by ejolson — Tue Jan 30, 2024 6:06 pm



Viewing all articles
Browse latest Browse all 5120

Trending Articles