Originally posted by Cyborg16
View Post
Code:
#include <bitset> bool f1(std::bitset<32> x, unsigned pos) { return x[pos]; } bool f2(unsigned x, unsigned pos) { return x & (1 << pos); }
Code:
_Z2f1St6bitsetILj32EEj: .LFB693: .cfi_startproc movl 8(%esp), %ecx movl $1, %eax sall %cl, %eax testl %eax, 4(%esp) setne %al ret .cfi_endproc
Code:
_Z2f2jj: .LFB694: .cfi_startproc movl 8(%esp), %ecx movl $1, %eax sall %cl, %eax testl %eax, 4(%esp) setne %al ret .cfi_endproc
Comment