o
odin.langpkg.dev
packages / library / AdventOfCode2015

AdventOfCode2015

c30c1c0library

No description provided.

No license ยท updated 8 months ago

Advent of Code 2015 in Odin

My happiness levels for each solution from 1-5: ๐Ÿฅฒ, ๐Ÿ˜ฌ, ๐Ÿ˜Œ, ๐Ÿ˜ƒ, ๐Ÿคฉ

Part 1 Part 2 Notes
Day 01 part1.odin - 0.130ms - ๐Ÿคฉ part2.odin - 0.044ms - ๐Ÿคฉ

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

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.