Subject: |
Re: [Merge] lp:~dirk.zimoch/epics-base/named-soft-events into lp:epics-base |
From: |
"J. Lewis Muir" <[email protected]> |
To: |
[email protected] |
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
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- 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
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|