[yast-devel] Re: [yast-commit] r66392 - in /trunk/snapper/agent-snapper/src: SnapperAgent.cc SnapperAgent.h
Dne 12.10.2011 13:43, jsuchome@svn2.opensuse.org napsal(a):
+int SnapperAgent::getIntValue (const YCPMap &map, const YCPString &key, const int &deflt)
Const reference to int doesn't make much sense, const int is enough. Size of int is 32bit on both i586/x86_64, but pointer to int (actually any pointer), which is used for passing reference, is 64bit on x86_64. (And reference needs a memory access while int can be stored directly in a CPU register - but it depends on gcc optimizations I guess...) -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Fixed in r66407 Dne 12.10.2011 14:08, Ladislav Slezak napsal(a):
Dne 12.10.2011 13:43, jsuchome@svn2.opensuse.org napsal(a):
+int SnapperAgent::getIntValue (const YCPMap &map, const YCPString &key, const int &deflt)
Const reference to int doesn't make much sense, const int is enough.
Size of int is 32bit on both i586/x86_64, but pointer to int (actually any pointer), which is used for passing reference, is 64bit on x86_64. (And reference needs a memory access while int can be stored directly in a CPU register - but it depends on gcc optimizations I guess...)
--
Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE
-- -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Dne St 12. října 2011 16:14:06 Ladislav Slezak napsal(a):
Fixed in r66407
Thanks for your comments! j -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (2)
-
Jiri Suchomel
-
Ladislav Slezak