[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 Witold Baryluk changed: What|Removed |Added Summary|md5 |md5 poor performance out of

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #2 from Witold Baryluk --- void main(string[] args) { import std.digest.md : MD5, toHexString; import std.digest : LetterCase; import std.stdio : File, writefln; foreach (filename; args[1..$]) { ubyte[32768] buffer_ = void;

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #3 from Witold Baryluk --- also openssl 1.1.1i-2 from Debian testing (uses 8kiB buffers): MD5(/usr/lib/live/mount/overlay/rw/var/lib/docker/devicemapper/devicemapper/data)= 009f07e9b8fb09a820dd180441502d46 real2m18.517s Similar to m

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #4 from Witold Baryluk --- FYI. Using File(filename).byChunk(32*1024)), to allocate buffer once on a heap, instead on a stack (which could be unaligned and use big stack offsets, leading to a bit more poor instruction encodings), leads to

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 Basile-z changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #5 from Basile-z ---

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #6 from ChloƩ --- Since you have 128 GB memory you could load the entire file into a byte array and compute the hash from there. Start the timer after loading the entire file. This should eliminate any potential difference in I/O from the

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #7 from Witold Baryluk --- (In reply to Basile-z from comment #5) > using ldc2 too ? there are option to enable best vectorization and bit op Quite a bit better with ldc2 (1.24.0 with LLVM 11.0.0, -release -mcpu=native -O3): 009f07e9b8f

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #8 from Witold Baryluk --- BTW. When using precompiled dmd and phobos, from dmd 2.095 from dlang.org. It is really really slow: dmd -O -inline -release -mcpu=avx2 -boundscheck=off md5.d 009f07e9b8fb09a820dd180441502d46 /usr/lib/live/mo

[Issue 21560] md5 poor performance out of the box

2021-01-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 --- Comment #9 from Witold Baryluk --- In-memory tests, on 16384 byte blocks (should fit nicely in caches). OpenSSL 1.1.1i (gcc-10.2.1 -fPIC -O2 -fstack-protector-strong ... -DOPENSSL_PIC -DMD5_ASM ...): 833MB/s standard/optimized (non-asm) C versi

[Issue 21560] md5 poor performance out of the box

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21560 Iain Buclaw changed: What|Removed |Added Priority|P1 |P4 --