This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] normal_distribution<double> performance improvement with SSE


Hi,

On 09/26/2012 01:16 PM, Ulrich Drepper wrote:
Here is a patch to accelerate the __generate function for the
normal_distribution<double> class.  The speed-up is quite significant,
the amount depending on which random number engine is used.

mt19937 +20%

mt19937_64 +30%

sfmt19937 +30%

sfmt19937_64 +30%


This patch introduces a header with optimizations for <random>. No changes to existing code needed, this is a straight-forward specialization. Tested on x86_64-linux. More optimizations follow, there is still quite a bit of inefficiency in the existing interfaces. OK to commit?
Looks fine to me. I suppose you want _Power_of_2 inline?

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]