Closed cyrusmsk closed 2 years ago
@cyrusmsk I would add a LLVM version as a second entry. Then there is also the comparison possible between the different compilers.
@cyrusmsk I didn't see it at frist, but you probably need to rebase. I rewrote how I do the tests. I'm now using hyperfine instead of my custom scbench
tool, and create the needed metadata with a new scmeta
tool. Furthermore, I've also introduced "functions" to the Earthfile. (see #66)
This should work for your scenario:
d:
FROM +alpine
# RUN apk add --no-cache ldc gcc ldc-static binutils-gold
RUN apk add --no-cache gcc-gdc
COPY ./src/leibniz.cpp ./
# RUN --no-cache cc=gcc ldc2 -O3 -release -mcpu=native -flto=full -linker=gold -flto-binary=/usr/bin/ld.gold -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -m64 -static leibniz.d
RUN --no-cache gdc leibniz.d -o leibniz -O3 -frelease -march=native
DO +BENCH --name="d" --lang="D (GDC)" --version="gdc --version" --cmd="./leibniz"
@niklas-heer Thanks for pointing out on the update of bench system. Now the PR should be inline with the master. Actually it is exactly how you propose in your comment
@cyrusmsk you are very welcome 👍 Thank you for updating it. Glad to hear that it worked as intended 🙂
@cyrusmsk thank you very much for your contribution! 👍
GCC-family compiler is used (GDC). Currently non-optimal compilation flags are using (without static and lto) as used by C. After checking the possibility to run static and lto build in Alpine - the flags for compilation could be improved.
Also if the comparison with LLVM-based will be accepted it is possible to add LDC compiler (LLVM-based D compiler)