digitalmars.D.ldc - Performance problem with floor
- bearophile (5/5) Jun 22 2014 If someone here has followed this thread, ldc2 has big
- Orvid King (9/14) Jun 22 2014 Well, unless LDC is doing something somewhere that I can't find, Clang
- David Nadlinger via digitalmars-d-ldc (8/12) Jun 22 2014 The problem is that we somehow ended up with Iain's pure, multi-bitwidth...
If someone here has followed this thread, ldc2 has big performance problems with the function "floor": http://forum.dlang.org/thread/lo19l7$n2a$1 digitalmars.com Bye, bearophile
Jun 22 2014
On 6/22/2014 1:49 PM, bearophile wrote:If someone here has followed this thread, ldc2 has big performance problems with the function "floor": http://forum.dlang.org/thread/lo19l7$n2a$1 digitalmars.com Bye, bearophileWell, unless LDC is doing something somewhere that I can't find, Clang is using llvm's floor intrinsic, while LDC is using the non-inline asm version of floor in phobos. There is however a declaration for llvm's floor intrinsic in ldc.intrinsics : llvm_floor, but, with my limited knowledge of LDC's inner workings, I don't believe that is what is being used when you call std.math : floor. core.stdc.math would be using the standard C library's floor function, which would be using an intrinsic for floor.
Jun 22 2014
On 22 Jun 2014, at 21:33, Orvid King via digitalmars-d-ldc wrote:On 6/22/2014 1:49 PM, bearophile wrote:The problem is that we somehow ended up with Iain's pure, multi-bitwidth D implementation being the default. We should make our std.math call llvm.floor.*, or at least the C standard library one by default. Anybody wants to cook up a pull request for ldc-developers/phobos? Thanks, DavidIf someone here has followed this thread, ldc2 has big performance problems with the function "floor":Well, unless LDC is doing something somewhere that I can't find, […]
Jun 22 2014