[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: The no goto religion
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2007-08-03 9:37:19
Message-ID: 46B2F74F.70907 () acm ! org
[Download RAW message or body]

Robert Knight wrote:
>> If this takes a 25% performance hit, that
>> makes a large difference in the icon lookup performance.
> 
> Real data is much more persuasive than speculation.  If you posted a
> benchmark comparing your solution against the current code which
> showed a definite performance improvement then I am sure the developer
> community would pay more attention.

I wouldn't say that a bench mark based on that specific instance would 
illustrate my point.  I just happened upon this example while fixing a 
bug.   My idea is simple -- that I have agreed with Knuth's paper ever 
since it was first published.

You can get a poor (scanned) copy here for free:

http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf

Although I had problems downloading it -- use "wget".

You can get a OCR to text copy at acm.org if you are a member, or pay 
for it.

What I am saying is that if he is correct and KDE consistently uses the 
"no-goto-allowed" style of coding that this will result in a significant 
performance hit.  We would have to apply more efficient coding methods 
consistently -- just two changes in one file isn't going to make much 
difference.  I do not suggest that we use actual optimization methods 
that reduce readability.  A short jump to a label isn't any harder to 
figure out than where a "break" takes you.

So, please don't take my word for it, read Knuth's paper (which does 
have hard numbers) and see if it makes sense to you.

-- 
JRT

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic