Comments on: But wait, perhaps we can optimize it further! http://empathybox.com/archives/13 living la vida obscura Tue, 06 Jan 2009 00:56:15 +0000 http://wordpress.org/?v=2.2.2 By: Reg Braithwaite http://empathybox.com/archives/13#comment-6267 Reg Braithwaite Mon, 13 Aug 2007 14:46:02 +0000 http://empathybox.com/archives/13#comment-6267 The good news is that this should have NO effect on performance. Just about every compiler and interpreter implementation out there can optimize the test and the return statement away. I recall writing a Scheme implementation in 1998 that optimized this sort of thing just so that I could use my own version of #IF statements without incurring runtime costs. That being said, now we can count the cost of human capital. How long does it take a programmer reviewing this code to recover from the inevitable coughing/laughing fit? ;-) The good news is that this should have NO effect on performance. Just about every compiler and interpreter implementation out there can optimize the test and the return statement away.

I recall writing a Scheme implementation in 1998 that optimized this sort of thing just so that I could use my own version of #IF statements without incurring runtime costs.

That being said, now we can count the cost of human capital. How long does it take a programmer reviewing this code to recover from the inevitable coughing/laughing fit?

;-)

]]>
By: Peter Holm http://empathybox.com/archives/13#comment-128 Peter Holm Mon, 04 Dec 2006 18:50:11 +0000 http://empathybox.com/archives/13#comment-128 Haha I love the title "but wait, perhaps we can optimize it further!". Haha I love the title “but wait, perhaps we can optimize it further!”.

]]>
By: Brent Ritchie http://empathybox.com/archives/13#comment-88 Brent Ritchie Tue, 14 Nov 2006 19:02:59 +0000 http://empathybox.com/archives/13#comment-88 I think someone needs a little practice with DeMorgan's Laws and basic Logic Principles. This is totally not cool, and unacceptable. I could only imagine how much redundent checks like these slow down execution and clutter the control flow of a program. I think someone needs a little practice with DeMorgan’s Laws and basic Logic Principles. This is totally not cool, and unacceptable. I could only imagine how much redundent checks like these slow down execution and clutter the control flow of a program.

]]>
By: DAR http://empathybox.com/archives/13#comment-48 DAR Fri, 27 Oct 2006 13:45:08 +0000 http://empathybox.com/archives/13#comment-48 Sounds like fodder for thedailywtf! Sounds like fodder for thedailywtf!

]]>