Ver código fonte

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 anos atrás
pai
commit
b23cdaa58d
Acessado por: Chris Smith <chris@chameth.com> ID da chave GPG: 3A2D4BBDC4A3C9A9
2 arquivos alterados com 2 adições e 1 exclusões
  1. 1
    0
      .docker/entrypoint.sh
  2. 1
    1
      run.sh

+ 1
- 0
.docker/entrypoint.sh Ver arquivo

9
         go get -d -v ./... >/dev/null
9
         go get -d -v ./... >/dev/null
10
         go install ./... >/dev/null
10
         go install ./... >/dev/null
11
     fi
11
     fi
12
+    export GOGC=off
12
     time "${GOPATH}/bin/$1"
13
     time "${GOPATH}/bin/$1"
13
 fi
14
 fi

+ 1
- 1
run.sh Ver arquivo

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

Carregando…
Cancelar
Salvar