diff options
Diffstat (limited to 'test/bench/go1/fasta_test.go')
-rw-r--r-- | test/bench/go1/fasta_test.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/bench/go1/fasta_test.go b/test/bench/go1/fasta_test.go index dcb2d1055..bff056fa9 100644 --- a/test/bench/go1/fasta_test.go +++ b/test/bench/go1/fasta_test.go @@ -4,9 +4,24 @@ package go1 +import "runtime" + // Not a benchmark; input for revcomp. -var fasta25m = fasta(25e6) +var fastabytes = makefasta() + +func makefasta() []byte { + var n int = 25e6 + if runtime.GOARCH == "arm" { + // TODO(dfc) remove this limitation after precise gc. + // A value of 25e6 consumes 465mb of heap on 32bit + // platforms, which is too much for most ARM systems. + // A value of 25e5 produces a memory layout that + // confuses the gc on 32bit platforms. So 25e4 it is. + n = 25e4 + } + return fasta(n) +} func fasta(n int) []byte { out := make(fastaBuffer, 0, 11*n) |