Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  Index 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base
From: "J. Lewis Muir" <jlmuir@anl.gov>
To: mp+26190@code.launchpad.net
Date: Tue, 26 Oct 2010 21:34:46 -0000
On 10/26/10 3:41 PM, Ben F. wrote:
> On Dienstag, 26. Oktober 2010, Dirk Zimoch wrote:
>> Performance test
>>
>> I wrote a test that creates 255 events (named 1 ... 255) and
>> processes one of them 1 million times. Here are the results:
>> mirror-3.14
>>   2.389 seconds
>> named-soft-events
>>   3.150 seconds
>> named-soft-events2
>>   2.223 seconds
>>
>> (running on Ubuntu Linux in a vmWare box on Windows7 on my 1.3 GHz
>> dual core laptop using 1 CPU core for vmWare)
> 
> To me these numbers suggest that your hashing O(1) solution may not be 
> worth the added complexity and that doing string comparisons on small 
> strings is not very expensive. Could you do a test with somewhat longer 
> event names, around 20 to 30 characters long? What is the costs for the 
> better performance of named-soft-events2 over named-soft-events in 
> lines of code?

I'm not against looking at lines of code, but I would not say that fewer
lines of code is always better.  To me, readability is the more
important metric.  If the code is twice as long as some other code to do
the same thing, but easier to understand, I'd choose the code that's
twice as long and easier to understand.

Lewis
-- 
https://code.launchpad.net/~dirk.zimoch/epics-base/named-soft-events/+merge/26190
Your team EPICS Core Developers is requested to review the proposed merge of lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base.


References:
Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base Ben F.

Navigate by Date:
Prev: Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base Ben F.
Next: Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
Navigate by Thread:
Prev: Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base Ben F.
Next: Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·