faster filterng implementation

This commit is contained in:
cathugger
2017-09-27 21:07:33 +03:00
parent 966cf38205
commit 188f821778
3 changed files with 101 additions and 24 deletions

View File

@@ -1,8 +1,8 @@
AC_INIT(mkp224o)
# safety check
# sanity check
AC_CONFIG_SRCDIR([main.c])
# C compiler
: ${CFLAGS="-O3 -march=native"}
: ${CFLAGS="-O3 -march=native -fomit-frame-pointer"}
AC_PROG_CC
ed25519impl=""
@@ -11,7 +11,7 @@ AC_ARG_ENABLE([ref10],
[use ref10 ed25519 implementation @<:@default=yes@:>@])],
[
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "ref10"],
[AC_ERROR([only one ed25519 implementation can be defined"])])
[AC_ERROR([only one ed25519 implementation can be defined])])
ed25519impl="ref10"
],
[]
@@ -22,7 +22,7 @@ AC_ARG_ENABLE([amd64_51_30k],
[use amd64_51_30k ed25519 implementation @<:@default=no@:>@])],
[
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_51_30k"],
[AC_ERROR([only one ed25519 implementation can be defined"])])
[AC_ERROR([only one ed25519 implementation can be defined])])
ed25519impl="amd64_51_30k"
],
[]
@@ -33,7 +33,7 @@ AC_ARG_ENABLE([amd64_64_24k],
[use amd64_64_24k ed25519 implementation @<:@default=no@:>@])],
[
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_64_24k"],
[AC_ERROR([only one ed25519 implementation can be defined"])])
[AC_ERROR([only one ed25519 implementation can be defined])])
ed25519impl="amd64_64_24k"
],
[]
@@ -41,5 +41,18 @@ AC_ARG_ENABLE([amd64_64_24k],
AS_IF([test "x$ed25519impl" == "x"],[ed25519impl=ref10])
AC_ARG_ENABLE([intfilter],
[AS_HELP_STRING([--enable-intfilter],
[use 64bit integers for filtering. faster but limits filter length @<:@default=no@:>@])],
[], [enable_intfilter=no]
)
if test "x$enable_intfilter" = "xyes"
then
FILTERDEF="-DINTFILTER"
else
FILTERDEF=""
fi
AC_SUBST(ED25519IMPL,["$ed25519impl"])
AC_SUBST(FILTERDEF,["$FILTERDEF"])
AC_OUTPUT(Makefile)