Advent of Code implement comparison. This repo aims to expose the
complexity diff when trying to implement the same solution for
distinct programming languages.
The aoc-2020 was chosen for this challenge. I won't solve the
entire edition, but just the initial days, instead...
illustrative image: how many lines cost for day 1 solve (the C is
hiding a lot of impl code (~301 lines from aoc_utils))
As programming languages, Python and C was chosen since they're
the most level-gap1 languages I know.
To run and build this program, you'll need:
- git
- gcc2
- python interpreter
You can also use the Makefile and wincbuild.bat provided to
fast-(build|run) the program.
- clone + change directory
git clone https://github.com/nasccped/aoc-impl-comparison
cd aoc-impl-comparison- compile
mkdir -p out
gcc -o out/main.exe $(find c -type f -name *.c)- run
out/main # for normal run
out/main test # for test runWarning
At WindowsOS, you'll may need to use a ./ (dot) before the executable
path.
- run
# for normal run
./out/main
# for test run
# ./out/main testYou can use the Makefile to handle sources and bins.
make # this will print a help panelImportant
make cbuild recipe doesn't works well in Windows. Use
./wincbuild.bat instead.
