bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restrict qualifier and C++.


From: Nikos Mavrogiannopoulos
Subject: Re: restrict qualifier and C++.
Date: Mon, 11 Apr 2011 08:48:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

On 04/11/2011 12:56 AM, Paul Eggert wrote:
> On 04/10/2011 03:07 PM, Nikos Mavrogiannopoulos wrote:
>> As I understand it AC_C_RESTRICT checks whether restrict
>> is supported by the C compiler. I'm using the C++ compiler.
> 
> In that case, AC_C_RESTRICT should report that your C++
> compiler does not support 'restrict' when compiling C code.
> What goes wrong in that process?

Please ignore that. I though AC_C_RESTRICT only cares about
the C compiler. It seems it does the work on my case as well.
(it was a config.h inclusion issue on my part, sorry for the false
report).

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.

On my x86-64 the optimized version does:
Xoring in chunks of 32768 bytes: done. 29.64 Gb in 5.00 secs: 5.93 Gb/sec

While the gnulib version:
Xoring in chunks of 32768 bytes: done. 3.22 Gb in 5.00 secs: 0.64 Gb/sec

You can get the optimized code at:
http://cvs.lysator.liu.se/viewcvs/viewcvs.cgi/lsh/nettle/memxor.c?rev=1.4&root=lsh&view=auto

regards,
Nikos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]