Re: memxor

2011-04-12 Thread Simon Josefsson
Nikos Mavrogiannopoulos writes: > On 04/12/2011 03:50 PM, Simon Josefsson wrote: > >>>> I'm surprised the gnulib memxor ends up being used by GnuTLS at all. >>>> Nikos, shouldn't the Nettle implementation be used instead? Is this a >>>> que

Re: memxor

2011-04-12 Thread Nikos Mavrogiannopoulos
On 04/12/2011 03:50 PM, Simon Josefsson wrote: >>> I'm surprised the gnulib memxor ends up being used by GnuTLS at all. >>> Nikos, shouldn't the Nettle implementation be used instead? Is this a >>> question of the GnuTLS (gnulib) memxor symbol replacing the m

Re: memxor

2011-04-12 Thread Simon Josefsson
Nikos Mavrogiannopoulos writes: > On 04/12/2011 03:12 PM, Simon Josefsson wrote: > >>>> I had 10% speed-ups in a web server that used gnutls with the optimized >>>> version of memxor. That is because CBC encryption mode uses XOR heavily. >>>> 10% is en

Re: memxor

2011-04-12 Thread Nikos Mavrogiannopoulos
On 04/12/2011 03:12 PM, Simon Josefsson wrote: >>> I had 10% speed-ups in a web server that used gnutls with the optimized >>> version of memxor. That is because CBC encryption mode uses XOR heavily. >>> 10% is enormous speed-up considering that this is a very small

Re: memxor

2011-04-12 Thread Simon Josefsson
Bruno Haible writes: > Hello Nikos, > >> > Can you tell me >> > one program which spends more than 20% of its runtime in memxor? >> >> I had 10% speed-ups in a web server that used gnutls with the optimized >> version of memxor. That is because CBC e

Re: memxor

2011-04-12 Thread Bruno Haible
Hello Nikos, > > Can you tell me > > one program which spends more than 20% of its runtime in memxor? > > I had 10% speed-ups in a web server that used gnutls with the optimized > version of memxor. That is because CBC encryption mode uses XOR heavily. > 10% is enormous s

Re: memxor

2011-04-12 Thread Nikos Mavrogiannopoulos
ed code by default. > If you mean gmp's mpn_xor function, written in assembly language: It > would be a bad idea to include assembly language code in gnulib, > because the maintenance cost of such code is very high. Assembly > language source code depends on Hello, I meant the lin

Re: memxor

2011-04-11 Thread Bruno Haible
that Fortran has 'restrict' built-in for decades whereas it's relatively new for C. Additionally, memxor is not speed critical, AFAIK. Can you tell me one program which spends more than 20% of its runtime in memxor? memxor implements the addition in the GF(2^q) field, when using a ve

memxor [was: restrict qualifier and C++.]

2011-04-11 Thread Eric Blake
On 04/11/2011 12:48 AM, Nikos Mavrogiannopoulos wrote: > As an unrelated suggestion for memxor.c I had a discussion with > another project about that and we concluded on a gmp-based > version that is orders of magnitude faster. It would > be nice if gnulib included the optimized code by default. P

Re: memxor

2005-10-07 Thread Simon Josefsson
Paul Eggert <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> The module depend on restrict, but the AC_REQUIRE in m4 wasn't >> present. I added it. But is it necessary? Shouldn't depending on >> the restrict module be sufficient? > > No, sorry, I missed the fact th

Re: memxor

2005-10-06 Thread Paul Eggert
Simon Josefsson <[EMAIL PROTECTED]> writes: > The module depend on restrict, but the AC_REQUIRE in m4 wasn't > present. I added it. But is it necessary? Shouldn't depending on > the restrict module be sufficient? No, sorry, I missed the fact that the module depends on restrict. In that case yo

Re: memxor

2005-10-06 Thread Simon Josefsson
rent implementation uses 'restrict', so memxor.m4 should > AC_REQUIRE([gl_C_RESTRICT]) and the memxor module should depend on the > restrict module. The module depend on restrict, but the AC_REQUIRE in m4 wasn't present. I added it. But is it necessary? Shouldn't dependin

Re: memxor

2005-10-05 Thread Paul Eggert
Simon Josefsson <[EMAIL PROTECTED]> writes: > I am not sure about the prototype. Should it use 'char*'? 'int*'? If its name is mem* then it should use void *, for consistency. The current implementation uses 'restrict', so memxor.m4 should AC_REQUIRE

Re: memxor

2005-10-05 Thread Simon Josefsson
for (; n > 0; n--) >*d++ ^= *s++; > > but that's a detail. Also the comment in memxor.h should say what > memxor does and what the return value is. I made the change, and installed it. >> I am not sure about the prototype. Should it use 'char*'? '

Re: memxor

2005-10-05 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > * Simon Josefsson wrote on Wed, Oct 05, 2005 at 02:10:14PM CEST: >> >> +/* Written by Simon Josefsson. The interface was inspired by memxor >> + in Niels Möller's Nettle. */ > *snip* > >> +void *m

Re: [bug-gnulib] memxor

2005-10-05 Thread Bruno Haible
Simon Josefsson wrote: > Ok to install? Yes. I'd try to help the compilers with not-so-good loop optimizers by changing for (i = 0; i < n; i++) d[i] ^= s[i]; into for (; n > 0; n--) *d++ ^= *s++; but that's a detail. Also the comment in memxor.h sho

Re: memxor

2005-10-05 Thread Ralf Wildenhues
* Simon Josefsson wrote on Wed, Oct 05, 2005 at 02:10:14PM CEST: > > +/* Written by Simon Josefsson. The interface was inspired by memxor > + in Niels Möller's Nettle. */ *snip* > +void *memxor (void *dest, const void *src, size_t n); *snip* Random comment the casual reade

memxor

2005-10-05 Thread Simon Josefsson
as long as this notice is preserved. + +AC_DEFUN([gl_MEMXOR], +[ + AC_LIBSOURCES([memxor.h, memxor.c]) + AC_LIBOBJ([memxor]) +]) Index: lib/memxor.h === RCS file: lib/memxor.h diff -N lib/memxor.h --- /dev/null 1 Jan 1970 00:00:00