time-to-botec/go/makefile

17 lines
527 B
Makefile
Raw Normal View History

2024-02-15 23:57:22 +00:00
dev:
2024-02-15 23:25:36 +00:00
go run squiggle.go
2024-02-15 23:57:22 +00:00
build:
go build squiggle.go
build-complex:
go build -ldflags="-s -w" squiggle.go
# https://stackoverflow.com/questions/45003259/passing-an-optimization-flag-to-a-go-compiler
run:
./squiggle
time-linux:
@echo "Running 100x and taking avg time: ./squiggle"
@t=$$(/usr/bin/time -f "%e" -p bash -c 'for i in {0..100}; do ./squiggle; done' 2>&1 >/dev/null | grep real | awk '{print $$2}' ); echo "scale=2; 1000 * $$t / 100" | bc | sed "s|^|Time using 16 threads: |" | sed 's|$$|ms|' && echo