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
- Replies:
- RE: EPICS base V4: iocCore database Jeff Hill
- References:
- RE: EPICS base V4: iocCore database Jeff Hill
- Navigate by Date:
- Prev:
Re: EPICS base V4: iocCore database Marty Kraimer
- Next:
RE: EPICS base V4: iocCore database Kenneth Evans, Jr.
- 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: EPICS base V4: iocCore database Jeff Hill
- Next:
RE: EPICS base V4: iocCore database Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|