Changes between Version 14 and Version 15 of PortableRrdFormat


Ignore:
Timestamp:
Jun 21, 2007, 8:31:07 AM (15 years ago)
Author:
oetiker
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PortableRrdFormat

    v14 v15  
    137137}}}
    138138
     139ARMv5b
     140{{{
     141    0.000000e+00 ->  00 00 00 00 00 00 00 00
     142    1.000000e+00 ->  3f f0 00 00 00 00 00 00
     143   -1.000000e+00 ->  bf f0 00 00 00 00 00 00
     144             nan ->  7f f8 00 00 00 00 00 00
     145             inf ->  7f f0 00 00 00 00 00 00
     146            -inf ->  ff f0 00 00 00 00 00 00
     147    2.000000e+00 ->  40 00 00 00 00 00 00 00
     148    4.000000e+00 ->  40 10 00 00 00 00 00 00
     149    8.000000e+00 ->  40 20 00 00 00 00 00 00
     150    1.600000e+01 ->  40 30 00 00 00 00 00 00
     151   8.642135e+130 ->  5b 1f 2b 43 c7 c0 25 2f
     152}}}
     153
    139154As you can see, there is not all that much difference between the architectures (it is all IEEE 754 after all). For one there is the endianess difference and then there are some differing ideas regarding NANs. In any event, a converter between these formats is only a few defines away.
    140155
     
    172187#define x862ppc(A)     endianflip(A)
    173188
    174 #define arm2x86(A)     ((uint64_t)(A) == 0xffffffffffffffffLL \
     189#define armv5b2x86(A)  endianflip(A)
     190
     191#define x862armv5b(A)  endianflip(A)
     192
     193#define armv4l2x86(A) ((uint64_t)(A) == 0xffffffffffffffffLL \
    175194                                       ? 0x000000000000f87fLL \
    176195                                       : intswap(A))
    177196
    178 #define x862arm(A)     ((uint64_t)(A) == 0x000000000000f87fLL \
     197#define x862armv4l(A)  ((uint64_t)(A) == 0x000000000000f87fLL \
    179198                                       ? 0xffffffffffffffffLL \
    180199                                       : intswap(A))
     
    212231
    213232This means, that in order to produce a portable data format, structs must be laid out such that they are aligned the same, on 32 and 64 bit systems.
     233
     234I have done some quick performance tests on a Pentium 4 3.00GHz and found that
     235the x86->sparc conversion runs at 3e8 (300 million) updates per second if I compiled
     236my test with -O0. The same test with -O2 was 5 times faster, but maybe the optimizer found that I was not actually using the data and optimized it away. In any event,
     237that there will be no measurable performance impact from such a change.
    214238
    215239== Longs and Integers ==
     
    228252
    229253Based on this information a portable RRDtool data format that works at least on
    230 PPC, x86, Itanium, PARISC, ARM and SPARC will be not all that difficult to design.
     254PPC, x86, Itanium, PARISC, ARM4, ARM5 and SPARC will be not all that difficult to design.
    231255
    232256Information on other architectures is welcome: Alpha, MIPS.

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.