From edd2883e599ccf62ce46772b036a3704738e5f6a Mon Sep 17 00:00:00 2001 From: Mike Hamburg Date: Wed, 4 Mar 2015 15:29:52 -0800 Subject: [PATCH] condswap is the main remaining bottleneck on monty ladder. comment in a pragma but dont actually use it yet... --- src/decaf_fast.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/decaf_fast.c b/src/decaf_fast.c index 886dae7..a0772c8 100644 --- a/src/decaf_fast.c +++ b/src/decaf_fast.c @@ -181,12 +181,15 @@ sv cond_neg(gf x, decaf_bool_t neg) { } /** Constant time, if (swap) (x,y) = (y,x); */ -sv cond_swap(gf x, gf y, decaf_bool_t swap) { - FOR_LIMB(i, { +static inline void cond_swap(gf x, gf y, decaf_bool_t swap) { + int i; + /* PERF */ + //_Pragma("clang loop unroll(disable) vectorize(enable) vectorize_width(4) interleave_count(2)") + for (i=0; i