Browse Source

Disable the Go GC

For the most part we run for a few milliseconds and quit, there's
no need to do any GC in that time.

This will almost certainly bite me in the ass later somehow, but
for now it gives a small speedup.
master
Chris Smith 4 years ago
parent
commit
b23cdaa58d
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      .docker/entrypoint.sh
  2. 1
    1
      run.sh

+ 1
- 0
.docker/entrypoint.sh View File

@@ -9,5 +9,6 @@ if [ -d "$1" ]; then
9 9
         go get -d -v ./... >/dev/null
10 10
         go install ./... >/dev/null
11 11
     fi
12
+    export GOGC=off
12 13
     time "${GOPATH}/bin/$1"
13 14
 fi

+ 1
- 1
run.sh View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-IMAGE=csmith/aoc-2019-01
3
+IMAGE=csmith/aoc-2019-02
4 4
 
5 5
 docker image inspect $IMAGE >/dev/null 2>&1
6 6
 if [ $? -ne 0 ]

Loading…
Cancel
Save