Skip to content

goggle/AdventOfCode2024.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdventOfCode2024

Build Status

This Julia package contains my solutions for Advent of Code 2024.

Overview

Day Problem Time Allocated memory Source
1 459.477 μs 461.83 KiB
2 2.070 ms 3.64 MiB
3 470.249 μs 376.73 KiB
4 1.798 ms 3.06 MiB
5 2.104 ms 1.26 MiB
6 592.911 ms 52.99 MiB
7 221.356 ms 212.55 MiB
8 316.122 μs 671.41 KiB
9 32.603 ms 9.58 MiB
10 578.868 μs 633.67 KiB
11 15.732 ms 12.60 MiB
12 12.204 ms 10.00 MiB
13 3.101 ms 1.15 MiB
14 75.842 ms 275.06 KiB
15 1.944 ms 3.16 MiB
16 63.589 ms 41.34 MiB
17 6.921 ms 706.30 KiB
18 3.007 ms 5.51 MiB
19 57.908 ms 3.41 MiB
20 227.453 ms 224.97 MiB
21 296.609 μs 78.89 KiB
22 241.724 ms 78.80 MiB
23 4.197 ms 3.82 MiB
24 5.080 s 2.83 GiB
25 2.178 ms 3.47 MiB

The benchmarks have been measured on this machine:

Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores

Installation and Usage

Make sure you have Julia 1.8 or newer installed on your system.

Installation

Start Julia and enter the package REPL by typing ]. Create a new environment:

(@v1.8) pkg> activate aoc

Install AdventOfCode2024.jl:

(aoc) pkg> add https://github.com/goggle/AdventOfCode2024.jl

Go back to the Julia REPL by pushing the backspace key.

Usage

First, activate the package:

julia> using AdventOfCode2024

Each puzzle can now be run with dayXY():

julia> day01()
2-element Vector{Int64}:
 1590491
 22588371

This will use my personal input. If you want to use another input, provide it to the dayXY method as a string. You can also use the readInput method to read your input from a text file:

julia> input = readInput("/path/to/input.txt")

julia> AdventOfCode2024.Day01.day01(input)
2-element Vector{Int64}:
 1590491
 22588371