Skip to content

sprunq/AdventOfCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

   *    *  ()   *   *
*        * /\         *
      *   /i\\    *  *
    *     o/\\  *      *
 *       ///\i\    *
     *   /*/o\\  *    *
   *    /i//\*\      *
        /o/*\\i\   *
  *    //i//o\\\\     *
    * /*////\\\\i\*
 *    //o//i\\*\\\   *
   * /i///*/\\\\\o\   *
  *    *   ||     * 

2022

My first year participating in the Advent of Code.

My goal this year is keeping the total runtime of all problems below 1s.

Benchmark:

Average of 1000 runs on a Ryzen 5 3600 (single core)

╭───────┬───────────┬────────────┬─────────────┬──────────╮
│ Day   │ Part 1    │ Part 2     │ Combined    │ Relative │
╞═══════╪═══════════╪════════════╪═════════════╪══════════╡
│ 1     │ 46.2µs    │ 51.0µs     │ 0.097ms     │ 0.9%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 2     │ 8.2µs     │ 6.5µs      │ 0.015ms     │ 0.1%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 3     │ 23.3µs    │ 24.8µs     │ 0.048ms     │ 0.5%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 4     │ 54.0µs    │ 53.6µs     │ 0.108ms     │ 1.0%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 5     │ 76.8µs    │ 62.4µs     │ 0.139ms     │ 1.3%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 6     │ 3.2µs     │ 25.7µs     │ 0.029ms     │ 0.3%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 7     │ 26.1µs    │ 25.4µs     │ 0.052ms     │ 0.5%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 8     │ 467.9µs   │ 321.4µs    │ 0.789ms     │ 7.5%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 9     │ 359.2µs   │ 403.6µs    │ 0.763ms     │ 7.3%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 10    │ 1.3µs     │ 3.7µs      │ 0.005ms     │ 0.0%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 11    │ 19.5µs    │ 6304.9µs   │ 6.324ms     │ 60.4%    │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 12    │ 83.3µs    │ 76.8µs     │ 0.160ms     │ 1.5%     │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ 13    │ 804.6µs   │ 1137.7µs   │ 1.942ms     │ 18.5%    │
├───────┼───────────┼────────────┼─────────────┼──────────┤
│ Total │ 1.97349ms │ 8.497618ms │ 10.471108ms │ 100%     │
╰───────┴───────────┴────────────┴─────────────┴──────────╯

About

Somewhat optimized Advent of Code solutions in Rust

Resources

Stars

Watchers

Forks

Languages