-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: added intel assembly for sha algs #208
src: added intel assembly for sha algs #208
Conversation
edtubbs
commented
Mar 5, 2024
- Updated SHA256/SHA512 algorithms using Intel AVX/SSE assembly.
- Updated CMake and Makefile for AVX/SSE, NASM and assembly support.
- Added benchmarks for SHA256 and Scrypt with assembly optimizations.
- Added AVX/SSE and benchmark configuration options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only nit so far is to add bench to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything looks good to me with exception to adding bench to .gitignore. i'll ack after that. pretty stoked to get benchmarks in here! here are my results:
https://gist.github.com/xanimo/017c64171781eca50d0df497a3c637f7
3a77fb5
to
529f3d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not entirely sure what's going on here but have included output when building with --enable-intel-sse
:
/bin/bash ./libtool --tag=CC --mode=link gcc -I./include -I./src/logdb/include -fPIC -g -O2 -W -std=gnu99 -pedantic -Wall -Wextra -Wno-long-long -Wno-overlength-strings -msse4.2 -static -o such src/cli/such-such.o libdogecoin.la src/secp256k1/libsecp256k1.la src/intel/sse_t1/sha1_one_block_sse.o src/intel/sse_t1/sha256_one_block_sse.o src/intel/sse_t1/sha512_one_block_sse.o -levent_core -lunistring
libtool: link: gcc -I./include -I./src/logdb/include -fPIC -g -O2 -W -std=gnu99 -pedantic -Wall -Wextra -Wno-long-long -Wno-overlength-strings -msse4.2 -o such src/cli/such-such.o src/intel/sse_t1/sha1_one_block_sse.o src/intel/sse_t1/sha256_one_block_sse.o src/intel/sse_t1/sha512_one_block_sse.o ./.libs/libdogecoin.a src/secp256k1/.libs/libsecp256k1.a -levent_core -lunistring
gcc: error: src/intel/sse_t1/sha1_one_block_sse.o: No such file or directory
gcc: error: src/intel/sse_t1/sha256_one_block_sse.o: No such file or directory
gcc: error: src/intel/sse_t1/sha512_one_block_sse.o: No such file or directory
make[1]: *** [Makefile:1234: such] Error 1
make[1]: Leaving directory '/mnt/source/repos/libdogecoin'
make: *** [Makefile:2469: all-recursive] Error 1
Building avx2 and scrypt-sse2 work fine but as soon as I purge the dir and run the process over something is not going right.
cmake: added avx/sse, nasm and assembly cmake: added bench config: added avx2/sse options config: added bench make: added avx/sse, nasm and assembly sha2: added assembly function definitions sha2: added sha256_one_block_avx/sse to sha256_transform sha2: added sha512_one_block_avx/sse to sha512_transform src: added bench for sha256 and scrypt git: added bench to git ignore
529f3d2
to
4d077c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested changes with xanimo@9bd9a32?diff=split&w=0 on ubuntu jammy and everything looks good. Here are my results: https://gist.github.com/xanimo/017c64171781eca50d0df497a3c637f7?permalink_comment_id=4994208#gistcomment-4994208
ACK