aboutsummaryrefslogtreecommitdiff
path: root/src/ast_render.cpp
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2018-01-13 14:40:21 +1300
committerMarc Tiehuis <marctiehuis@gmail.com>2018-01-13 14:40:21 +1300
commit51fdbf7f8c282c7b91a688c9069b363e90bedf6e (patch)
treed509b0494776da54c78aa299d4679cf4f17180e0 /src/ast_render.cpp
parent304f6f1d0165f9bdacb7d80479298ca0acff1c27 (diff)
downloadzig-51fdbf7f8c282c7b91a688c9069b363e90bedf6e.tar.gz
zig-51fdbf7f8c282c7b91a688c9069b363e90bedf6e.zip
Add Md5 and Sha1 hash functions
Some performance comparisons to C. We take the fastest time measurement taken across multiple runs. The block hashing functions use the same md5/sha1 methods. ``` Cpu: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz Gcc: 7.2.1 20171224 Clang: 5.0.1 Zig: 0.1.1.304f6f1d ``` See https://www.nayuki.io/page/fast-md5-hash-implementation-in-x86-assembly: ``` gcc -O2 661 Mb/s clang -O2 490 Mb/s zig --release-fast and zig --release-safe 570 Mb/s zig 50 Mb/s ``` See https://www.nayuki.io/page/fast-sha1-hash-implementation-in-x86-assembly: ``` gcc -O2 588 Mb/s clang -O2 563 Mb/s zig --release-fast and zig --release-safe 610 Mb/s zig 21 Mb/s ``` In short, zig provides pretty useful tools for writing this sort of code. We are in the lead against clang (which uses the same LLVM backend) with us being slower only against md5 with GCC.
Diffstat (limited to 'src/ast_render.cpp')
0 files changed, 0 insertions, 0 deletions