2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EPICS base V4: iocCore database |
From: | Benjamin Franksen <[email protected]> |
To: | Jeff Hill <[email protected]> |
Cc: | 'Marty Kraimer' <[email protected]>, 'Andrew Johnson' <[email protected]>, 'Bob Dalesio' <[email protected]>, 'Ralph Lange' <[email protected]>, 'Eric Norum' <[email protected]>, 'Ken Evans' <[email protected]>, 'Ned Arnold' <[email protected]>, 'Matej Sekoranja' <[email protected]> |
Date: | Wed, 23 Feb 2005 17:10:02 +0100 |
On Wednesday 23 February 2005 16:48, Jeff Hill wrote: > > The bottom line is that unsigned types should be used only in > > the very few cases where they are essential to > > faithfully represent raw hardware values. > > I find that unsigned types are quite useful for situations where > the operand must never be negative. For example, with array > indexes this improves performance and simplifies the code when > range checking because only one side of the range check need be > done. Of course, I can't expect that everyone will agree :-) I thought it was obvious from the context (but maybe I should have stated it explicitly) that I was only talking about record field and corresponding CA data types, not programming in general. Record field values are rarely used directly as indices into arrays and even if they would be, the overhead involved in using them would be orders of magnitude larger than any overhead due to additional range checks. Ben