Skip to content

goggle/AdventOfCode2023.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdventOfCode2023

Build Status

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

Overview

Day Problem Time Allocated memory Source
1 2.304 ms 3.00 MiB
2 1.050 ms 350.39 KiB
3 1.894 ms 1.80 MiB
4 2.745 ms 1.40 MiB
5 71.969 ms 198.09 KiB
6 7.953 μs 7.44 KiB
7 11.831 ms 15.28 MiB
8 11.879 ms 556.42 KiB
9 1.408 ms 1.72 MiB
10 7.801 ms 7.78 MiB
11 4.728 ms 1.71 MiB
12 9.320 ms 2.64 MiB
13 2.202 ms 3.18 MiB
14 56.620 ms 22.56 MiB
15 2.647 ms 1.49 MiB
16 33.972 ms 53.35 MiB
17 50.170 ms 2.72 MiB
18 630.330 μs 484.14 KiB
19 2.559 ms 1.79 MiB
20 65.710 ms 28.76 MiB
21 9.675 ms 7.19 MiB
22 790.712 ms 631.26 MiB
23 2.979 s 9.69 MiB
24 43.214 ms 49.77 MiB
25 69.476 ms 62.03 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 AdventOfCode2023.jl:

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

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

Usage

First, activate the package:

julia> using AdventOfCode2023

Each puzzle can now be run with dayXY():

julia> day01()
2-element Vector{Int64}:
 54708
 54087

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> AdventOfCode2023.Day01.day01(input)
2-element Vector{Int64}:
 54708
 54087