Parcourir la 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 il y a 4 ans
Parent
révision
b23cdaa58d
Signé par: Chris Smith <chris@chameth.com> ID de la clé GPG: 3A2D4BBDC4A3C9A9
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1
    0
      .docker/entrypoint.sh
  2. 1
    1
      run.sh

+ 1
- 0
.docker/entrypoint.sh Voir le fichier

@@ -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 Voir le fichier

@@ -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 ]

Chargement…
Annuler
Enregistrer