You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main_test.go 396B

1234567891011121314151617
  1. package main
  2. import (
  3. "github.com/csmith/aoc-2019/common"
  4. "runtime/debug"
  5. "testing"
  6. )
  7. func Benchmark(b *testing.B) {
  8. debug.SetGCPercent(-1)
  9. for i := 0; i < b.N; i++ {
  10. input := common.ReadCsvAsInts("input.txt")
  11. memoryBanks := make([]int, len(input)*5)
  12. _ = maxOutput(memoryBanks, input, []int{0, 1, 2, 3, 4}, false)
  13. _ = maxOutput(memoryBanks, input, []int{5, 6, 7, 8, 9}, true)
  14. }
  15. }