3 ms·
...and both compile a 128=64×64 multiplication into a single imul. __int128 mult128(int64_t a, int64_t b) { return (__int128)a * (__int128)b;
by cnvogel 11y ago
...and both compile a 128=64×64 multiplication into a single imul.
__int128
mult128(int64_t a, int64_t b)
{
return (__int128)a * (__int128)b;
a0: 48 89 f0 mov %rsi,%rax
a3: 48 f7 ef imul %rdi
a6: c3 retq
- nanis 11y agoI have: Apple LLVM version 7.0.0 (clang-700.1.76) Target: x86_64-apple-darwin15.0.0 Thread model: posix I did mention that the same source code when compiled with gcc runs faster in a Linux VM than when it is compiled with clang and run in OSX. That means, some of those optimization options either do not mean anything or do not work as well when using clang.