This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/874/ |
On September 18th, 2013, 2:40 p.m. CEST, Jan Synacek wrote:
src/account/LMI_AccountProvider.c (Diff revision 1) 59 if (init_lock_pool() == 0) {59 const int ret = init_lock_pool();This change is totally useless and introduces a variable that is thrown away after a few lines anyway.On September 18th, 2013, 2:44 p.m. CEST, Robin Hack wrote:
Ok. GCC without optimalizations convinst me. With variable: 0x000000000040047f <+0>: push %rbp 0x0000000000400480 <+1>: mov %rsp,%rbp 0x0000000000400483 <+4>: sub $0x10,%rsp 0x0000000000400487 <+8>: mov $0x0,%eax 0x000000000040048c <+13>: callq 0x400474 <c> 0x0000000000400491 <+18>: mov %eax,-0x4(%rbp) 0x0000000000400494 <+21>: cmpl $0x1,-0x4(%rbp) 0x0000000000400498 <+25>: jne 0x4004a1 <main+34> 0x000000000040049a <+27>: mov $0x0,%eax 0x000000000040049f <+32>: jmp 0x4004a6 <main+39> 0x00000000004004a1 <+34>: mov $0x1,%eax 0x00000000004004a6 <+39>: leaveq 0x00000000004004a7 <+40>: retq Without variable: 0x000000000040047f <+0>: push %rbp 0x0000000000400480 <+1>: mov %rsp,%rbp 0x0000000000400483 <+4>: mov $0x0,%eax 0x0000000000400488 <+9>: callq 0x400474 <c> 0x000000000040048d <+14>: cmp $0x1,%eax 0x0000000000400490 <+17>: jne 0x400499 <main+26> 0x0000000000400492 <+19>: mov $0x0,%eax 0x0000000000400497 <+24>: jmp 0x40049e <main+31> 0x0000000000400499 <+26>: mov $0x1,%eax 0x000000000040049e <+31>: leaveq 0x000000000040049f <+32>: retq
Yeah, definitely a worth optimization at the right place...
- Jan
On September 18th, 2013, 2:28 p.m. CEST, Robin Hack wrote:
Review request for OpenLMI Developers.
By Robin Hack.
Updated Sept. 18, 2013, 2:28 p.m.
Repository:
openlmi-providers
Description
Diffs
|