lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Optimized integral power


From: Vadim Zeitlin
Subject: Re: [lmi] Optimized integral power
Date: Thu, 22 Dec 2016 15:45:08 +0100

On Thu, 22 Dec 2016 02:36:49 +0000 Greg Chicares <address@hidden> wrote:

GC> Please take a look at commit 569b775d3ffc4afc526a83cb1a769f6d604101a8
GC> and let me know if you see any reason to keep the std::pow() alternative,
GC> now in a #if 0 ... #endif block. I'm inclined to remove it soon.

 I agree, I don't see how std::pow() could do better than what the new code
does (well, in theory some CPU could have a dedicated instruction for
performing this operation, but in practice I don't know of any such
instruction).


 On a completely unrelated note, I've looked at stl_extensions.hpp while
reviewing this and noticed copy_n() and iota() functions in it. It's true
that they were only available in some extensions of C++98 STL, but now they
are part of C++11 standard, so I think they should be removed now and the
corresponding std versions should be used instead. This looks especially
simple to do because each of these functions is only used once (in
ihs_acctval.cpp for copy_n and in gpt_test.cpp for iota). As always, I'm
ready to make a patch (or two) if it could be useful.

 Please let me know if it would,
VZ


reply via email to

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