diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2018-12-11 01:11:38 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2018-12-26 12:26:52 -0800 |
commit | f8719f5ae5acdc31d3794ddfea8ac963359de41e (patch) | |
tree | 70327ff8a4953abd605665ecd458a3c4b1a66443 /configure | |
parent | 41d86c73b21191a3fa9ea5f476fc9f1fc5e4f8b3 (diff) | |
download | zlib-f8719f5ae5acdc31d3794ddfea8ac963359de41e.tar.gz zlib-f8719f5ae5acdc31d3794ddfea8ac963359de41e.tar.bz2 zlib-f8719f5ae5acdc31d3794ddfea8ac963359de41e.zip |
Speed up software CRC-32 computation by a factor of 1.5 to 3.
Use the interleaved method of Kadatch and Jenkins in order to make
use of pipelined instructions through multiple ALUs in a single
core. This also speeds up and simplifies the combination of CRCs,
and updates the functions to pre-calculate and use an operator for
CRC combination.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 33 |
1 files changed, 14 insertions, 19 deletions
@@ -367,8 +367,11 @@ else | |||
367 | try() | 367 | try() |
368 | { | 368 | { |
369 | show $* | 369 | show $* |
370 | ( $* ) >> configure.log 2>&1 | 370 | got=`( $* ) 2>&1` |
371 | ret=$? | 371 | ret=$? |
372 | if test "$got" != ""; then | ||
373 | printf "%s\n" "$got" >> configure.log | ||
374 | fi | ||
372 | if test $ret -ne 0; then | 375 | if test $ret -ne 0; then |
373 | echo "(exit code "$ret")" >> configure.log | 376 | echo "(exit code "$ret")" >> configure.log |
374 | fi | 377 | fi |
@@ -381,8 +384,11 @@ tryboth() | |||
381 | show $* | 384 | show $* |
382 | got=`( $* ) 2>&1` | 385 | got=`( $* ) 2>&1` |
383 | ret=$? | 386 | ret=$? |
384 | printf %s "$got" >> configure.log | 387 | if test "$got" != ""; then |
388 | printf "%s\n" "$got" >> configure.log | ||
389 | fi | ||
385 | if test $ret -ne 0; then | 390 | if test $ret -ne 0; then |
391 | echo "(exit code "$ret")" >> configure.log | ||
386 | return $ret | 392 | return $ret |
387 | fi | 393 | fi |
388 | test "$got" = "" | 394 | test "$got" = "" |
@@ -457,17 +463,11 @@ size_t dummy = 0; | |||
457 | EOF | 463 | EOF |
458 | if try $CC -c $CFLAGS $test.c; then | 464 | if try $CC -c $CFLAGS $test.c; then |
459 | echo "Checking for size_t... Yes." | tee -a configure.log | 465 | echo "Checking for size_t... Yes." | tee -a configure.log |
460 | need_sizet=0 | ||
461 | else | 466 | else |
462 | echo "Checking for size_t... No." | tee -a configure.log | 467 | echo "Checking for size_t... No." | tee -a configure.log |
463 | need_sizet=1 | 468 | # find a size_t integer type |
464 | fi | 469 | # check for long long |
465 | 470 | cat > $test.c << EOF | |
466 | echo >> configure.log | ||
467 | |||
468 | # find the size_t integer type, if needed | ||
469 | if test $need_sizet -eq 1; then | ||
470 | cat > $test.c <<EOF | ||
471 | long long dummy = 0; | 471 | long long dummy = 0; |
472 | EOF | 472 | EOF |
473 | if try $CC -c $CFLAGS $test.c; then | 473 | if try $CC -c $CFLAGS $test.c; then |
@@ -495,17 +495,13 @@ EOF | |||
495 | if try $CC $CFLAGS -o $test $test.c; then | 495 | if try $CC $CFLAGS -o $test $test.c; then |
496 | sizet=`./$test` | 496 | sizet=`./$test` |
497 | echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log | 497 | echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log |
498 | CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" | ||
499 | SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" | ||
498 | else | 500 | else |
499 | echo "Failed to find a pointer-size integer type." | tee -a configure.log | 501 | echo "Checking for a pointer-size integer type... not found." | tee -a configure.log |
500 | leave 1 | ||
501 | fi | 502 | fi |
502 | fi | 503 | fi |
503 | 504 | ||
504 | if test $need_sizet -eq 1; then | ||
505 | CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" | ||
506 | SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" | ||
507 | fi | ||
508 | |||
509 | echo >> configure.log | 505 | echo >> configure.log |
510 | 506 | ||
511 | # check for large file support, and if none, check for fseeko() | 507 | # check for large file support, and if none, check for fseeko() |
@@ -849,7 +845,6 @@ echo SHAREDLIBV = $SHAREDLIBV >> configure.log | |||
849 | echo STATICLIB = $STATICLIB >> configure.log | 845 | echo STATICLIB = $STATICLIB >> configure.log |
850 | echo TEST = $TEST >> configure.log | 846 | echo TEST = $TEST >> configure.log |
851 | echo VER = $VER >> configure.log | 847 | echo VER = $VER >> configure.log |
852 | echo Z_U4 = $Z_U4 >> configure.log | ||
853 | echo SRCDIR = $SRCDIR >> configure.log | 848 | echo SRCDIR = $SRCDIR >> configure.log |
854 | echo exec_prefix = $exec_prefix >> configure.log | 849 | echo exec_prefix = $exec_prefix >> configure.log |
855 | echo includedir = $includedir >> configure.log | 850 | echo includedir = $includedir >> configure.log |