Skip to content

LucasCzerny/AdventOfCode-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2025 in Odin

My happiness levels for each solution from 1-5: 🥲, 😬, 😌, 😃, 🤩

Part 1 Part 2 Notes
Day 01 part1.odin: 0.235ms 😃 part2.odin: 1.225ms 😌 Suprisingly difficult for a day 1. Had some logic error and then just went for brute force for part 2
Day 02 part1.odin: 71.201ms 😃 part2.odin: 88.099ms 😃 Didn't feel like doing a ton of modulo math so i just did the string conversion. I'm running it on 16 threads, lol. It was fun though! :)
Day 03 part1.odin: 0.104ms 🤩 part2.odin: 0.215ms 🤩 Very easy and fun puzzle today!
Day 04 part1.odin: 1.315ms 🤩 part2.odin: 2.963ms 🤩 Wasn't happy with my initial solution so I rewrote it. I think it turned out pretty nice
Day 05 part1.odin: 0.855ms 🤩 part2.odin: 0.365ms 🤩 Wanted to use trees at first but it was faster to just sort that shit
Day 06 part1.odin: 3.384ms 🤩 part2.odin: 0.591ms 🤩 I used regex for part1 (took me a bit to get right cuz I suck at regex). Part2 was ez
Day 07 part1.odin: 0.300ms 🤩 part2.odin: 2.467ms 🤩 Had two off by one errors while solving this lol
Day 08 part1.odin: 14018.089ms 😬 part2.odin: 85224.883ms 🥲 Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Day 09 part1.odin: 2.796ms 🤩 part2.odin: 864.851ms 😃 Finished this on day 10

How to run

NOTE: You're not allowed to upload your puzzle input to GitHub. If you clone this repo, create a folder called input/ at the root and place your dayxx.txt files inside.

To run a solution:

odin run dayxx

Do not cd dayxx first.

To enable the tracking allocator, which detects memory leaks and bad frees:

odin run dayxx -debug

Note on the runtimes

To measure the speed of each solution, I simply do:

start := time.tick_now()
partx_result := solve_partx(input)
duration := time.tick_since(start)

This is good enough for my purposes and I didn't want to do any sophisticated benchmarking. Also, all of the runtimes come from my Dell Latitude laptop.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages