commit 2129814c57535c3c9de6fdc3e61a04a0d936e18d
parent e9fee17c5f93ddfe217f630b241884cd998087d5
Author: bsandro <email@bsandro.tech>
Date: Sat, 13 Dec 2025 00:18:50 +0200
added readme and rutimes data with gnuplot script
Diffstat:
3 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/README b/README
@@ -0,0 +1,23 @@
+Advent of Code 2025 solutions.
+
+License: BSD 2-Clause.
+Language: C
+Requirements: C99-conformant compiler, GNU make. Day 10 part 2 requires GLPK library.
+
+Each .c file contains both parts of the corresponding day puzzle.
+
+Day 8 is unoptimized crap, works 45 seconds even on my Ryzen 3900X, be advised. I didn't include it into stats described below.
+
+Day 11 built with clang v19.1.7 on NetBSD i386 crashes with memory error if built with -O2 or -O3 option. -O1 works fine.
+
+Tested on different architectures and operating systems:
+
+- amd64: Ryzen 3900X with Fedora 43
+- i386: Celeron 633MHz (Coppermine, socket370) with NetBSD 10.1
+- riscv64: Starfive VisionFive 2 board with Debian Bookworm/sid
+- ppc32: PowerPC G4 1.33GHz (iBook G4) with MacOS X 10.5.8
+- arm64: Pinebook Pro with Manjaro-ARM 24.03
+
+I've used both gcc6 and gcc-mp-14 from ports on OSX; gcc6 binaries are slower.
+
+Saved run times for posterity in runtimes.txt, there is a gnuplot script (runtimes.plt) to make visualization.
diff --git a/runtimes.plt b/runtimes.plt
@@ -0,0 +1,12 @@
+#!/usr/bin/gnuplot
+
+set title "Run time per machine, seconds"
+set xlabel "Day"
+set ylabel "Seconds"
+set grid
+set style data histogram
+set style fill solid border -1
+set logscale y
+set key top left outside
+
+plot for [i=2:6] 'runtimes.txt' using i:xtic(1) title col
diff --git a/runtimes.txt b/runtimes.txt
@@ -0,0 +1,13 @@
+Day amd64 i386 powerpc riscv64 arm64
+01 0.0001 0.03 0.0025 0.0011 0.001
+02 0.14 3.53 4.74 9.6 4.83
+03 0.0002 0.05 0.0016 0.0017 0.001
+04 0.002 0.06 0.011 0.021 0.013
+05 0.003 0.06 0.003 0.0033 0.003
+06 0.0002 0.05 0.002 0.0022 0.001
+07 0.0001 0.09 0.0014 0.001 0.001
+08 0 0 0 0 0
+09 0.04 0.86 0.42 0.42 0.17
+10 0.89 33.0 9.26 9.8 5.00
+11 0.34 9.14 1.93 4.17 1.9
+12 0.0001 0.03 0.0037 0.0019 0.001