[MPFR] Re: Efficiently importing/export GMP floats
Richard Guenther
rguenther at suse.de
Mon Jan 17 17:25:18 CET 2011
On Mon, 17 Jan 2011, Joerg Arndt wrote:
> * foxmuldrster at yahoo.com <foxmuldrster at yahoo.com> [Jan 17. 2011 16:32]:
> > BSWAP or equivalents work on x86 and others, but not on all
> > architectures. And it requires a load and store minimally even on
> > x86.
> >
>
> I dont understand, bswap allows reg-->reg operation
> (but mem-->reg may actually be better here).
>
> // Here's reg-->reg:
> static inline ulong asm_bswap(ulong x)
> {
> asm ("bswap %0" : "=r" (x) : "0" (x));
> return x;
> }
>
> > I am currently processing 1min and 30sec resolution geodetic
> > topography and bathymetry data sets. Converting the endian takes a
> > few seconds on 1min and about 12 on 30sec, and these are 440MB and
> > 1.8GB data sets using a single thread, as does GMP.
>
> These times do appear long-ish to me.
> But how does that compare with processing time (for the 1.8GB set)?
I suppose it is only free if you operate without cache-miss
penalty (thus, as part of streaming in data), but not when you first
convert all
data and then operate on it.
Richard.
>
> >
> > It's an architecture-biased form of processing expense that's
> > entirely done away with by this convention.
>
> Then you can just do a binary dump (iff the sizes can be determined).
> But please let that not be mixed in the portable format.
>
> If TG agrees to make both conventions possible (and do the extra work)
> then that's obviously OK.
>
> >
> > - Rick
> >
> > [...]
>
> cheers, jj
>
--
Richard Guenther <rguenther at suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
More information about the gmp-discuss
mailing list