Double-precision trig functions in C seem to be 1.5x slower when compiling for 64-bit environment than with 32-bit, dunno why #programming


@sjb I’m a bit of an expert with these things, probably a stack overflow in the iteration due to the complexity of all the extra bit overheads.

· · Tootle for Mastodon · 1 · 0 · 0

@BobJohn It's surprising because in my tests of other floating-point-heavy programs, 64-bit was up to 2x faster than 32-bit. I'm guessing because SSE2 was enabled in 64-bit mode.

However, I'm now confused exactly where trig functions are calculated. I thought the CPU had hardware for it but maybe not?

@sjb It all depends on the orientation of the flops and if they are in-silica optimised, otherwise your going to need a bigger bus.

Sign in to participate in the conversation
No Agenda Social

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!