diff --git a/README.md b/README.md index b4bc6b3..abf0fde 100644 --- a/README.md +++ b/README.md @@ -219,15 +219,31 @@ meson build cd build ninja ninja test + +time ./build/sambamba sort HG00100.chrom20.ILLUMINA.bwa.GBR.low_coverage.20130415.bam +sambamba 1.0.1 + by Artem Tarasov and Pjotr Prins (C) 2012-2023 + LDC 1.32.0 / DMD v2.102.2 / LLVM14.0.6 / bootstrap LDC - the LLVM D compiler (1.32.0) +real 0m13.343s +user 2m11.663s +sys 0m4.232s ``` -or possibly with some additional tuning +or possibly with some additional tuning runtimes get close to the optimized static build (see [benchmarks](test/benchmark/stats.org). ```sh rm -rf build/ ; env D_LD=gold CC=gcc meson build --buildtype release cd build/ env CC=gcc ninja env CC=gcc ninja test + +time ./build/sambamba sort HG00100.chrom20.ILLUMINA.bwa.GBR.low_coverage.20130415.bam +sambamba 1.0.1 + by Artem Tarasov and Pjotr Prins (C) 2012-2023 + LDC 1.32.0 / DMD v2.102.2 / LLVM14.0.6 / bootstrap LDC - the LLVM D compiler (1.32.0) +real 0m10.227s +user 2m7.203s +sys 0m4.039s ``` ## Compiling for MacOS diff --git a/guix.scm b/guix.scm index 6e8d5b1..9a75eb0 100644 --- a/guix.scm +++ b/guix.scm @@ -2,13 +2,6 @@ ;; ;; guix shell -C -D -f guix.scm -- bash --init-file <(echo "ln -s /bin/sh /bin/bash") ;; -;; and build -;; -;; find -name CMakeCache.txt|xargs rm -v -;; cd build -;; cmake -DCMAKE_BUILD_TYPE=Debug .. -;; cmake --build . --verbose -- -j 14 && ctest . --verbose -;; ;; For the tests you may need /usr/bin/env. In a container create it with ;; ;; mkdir -p /usr/bin ; ln -s $GUIX_ENVIRONMENT/bin/env /usr/bin/env @@ -27,12 +20,15 @@ (guix gexp) (gnu packages base) (gnu packages bioinformatics) ; for samtools in sambamba + (gnu packages build-tools) ; for meson (gnu packages compression) (gnu packages curl) (gnu packages dlang) (gnu packages gcc) + (gnu packages pkg-config) (gnu packages perl) (gnu packages python) + (gnu packages ninja) (gnu packages ruby) (gnu packages tls) (gnu packages version-control) @@ -77,6 +73,9 @@ (inputs `(("samtools" ,samtools) ; for pileup ("bcftools" ,bcftools) ; for pileup + ("meson" ,meson) ; for testing meson build system + ("ninja" ,ninja) + ("pkg-config" ,pkg-config) ("lz4" ,lz4) ("lz4-static" ,lz4 "static") ("zlib-static" ,zlib "static") diff --git a/meson.build b/meson.build index 5b57572..c8260ca 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('Sambamba', ['c','d'], license : 'GPL-2.0', - version : '1.0.0', + version : '1.0.1', # default_options : ['buildtype=debugoptimized'] ) @@ -29,7 +29,7 @@ endif # The optimized flags are # ldc2 -singleobj -wi -I. -IBioD -g -J. -O3 -release -enable-inlining -boundscheck=off -L-lz -c -of=bin/sambamba-0.8.2.o -extra_dflags = [ '-I../BioD','-g','-release','-boundscheck=off'] +extra_dflags = [ '-I../BioD','-I../BioD/contrib/msgpack-d/src','-g','-release','-boundscheck=off','-enable-inlining','-singleobj'] extra_ldflags = ['-L=-flto=full'] # @@ -176,8 +176,18 @@ cram_src = [ ] thirdparty_src = [ - 'thirdparty/mergesort.d', - 'thirdparty/unstablesort.d' +'thirdparty/mergesort.d', +'thirdparty/unstablesort.d', +'BioD/contrib/msgpack-d/src/msgpack/attribute.d', +'BioD/contrib/msgpack-d/src/msgpack/common.d', +'BioD/contrib/msgpack-d/src/msgpack/package.d', +'BioD/contrib/msgpack-d/src/msgpack/register.d', +'BioD/contrib/msgpack-d/src/msgpack/unpacker.d', +'BioD/contrib/msgpack-d/src/msgpack/buffer.d', +'BioD/contrib/msgpack-d/src/msgpack/exception.d', +'BioD/contrib/msgpack-d/src/msgpack/packer.d', +'BioD/contrib/msgpack-d/src/msgpack/streaming_unpacker.d', +'BioD/contrib/msgpack-d/src/msgpack/value.d', ] manpages = [ diff --git a/test/benchmark/stats.org b/test/benchmark/stats.org index 0d9f298..702a2e2 100644 --- a/test/benchmark/stats.org +++ b/test/benchmark/stats.org @@ -55,6 +55,13 @@ sys 0m0.240s time ./bin/sambamba-1.0.0 sort HG00100.chrom20.ILLUMINA.bwa.GBR.low_coverage.20130415.bam +sambamba 1.0.1 + by Artem Tarasov and Pjotr Prins (C) 2012-2023 + LDC 1.32.0 / DMD v2.102.2 / LLVM14.0.6 / bootstrap LDC - the LLVM D compiler (1.32.0) +real 0m9.599s +user 2m1.039s +sys 0m3.834s + sambamba 1.0.0 by Artem Tarasov and Pjotr Prins (C) 2012-2022 LDC 1.32.0 / DMD v2.102.2 / LLVM14.0.6 / bootstrap LDC - the LLVM D compiler (1.32.0)