comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Performance of the Streams 'Read and 'Write
Date: Tue, 17 Nov 2009 04:57:26 -0800 (PST)
Date: 2009-11-17T04:57:26-08:00	[thread overview]
Message-ID: <e11d679a-d4a5-4660-9a66-75276224e168@k17g2000yqh.googlegroups.com> (raw)
In-Reply-To: e93ea909-9b8e-44c6-a537-fd68ed47cbc4@z41g2000yqz.googlegroups.com

Hello,
I have an idea about how to patch GNAT on this.
Indeed, there is already a fast Stream exchangein GNAT, only for the
{Wide_}String types.
So, at the end of Find_Stream_Subprogram, exp_attr.adb, I would add
something like

if Is_Array_Type(Typ) and then
  Is_Bit_Packed_Array (Typ) and then
  Component_Size (Typ) = 8 and then
then
  Comp_Typ:= Component_Type (Typ);
  if Is_Modular_Integer_Type(Comp_Typ) and then
    [modulus ??] (Comp_Typ) = 2**8
  then
    [ go ahead with some unchecked conversion to String ]
    return [the right thing];
  end if;
end if;

Now, I have no experience with building GNAT, from the GCC tree.
Would someone like to help ?
Or is it easy to on Windows (currently, no Linux available on my
side) ?
TIA
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!



  parent reply	other threads:[~2009-11-17 12:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 23:29 Performance of the Streams 'Read and 'Write Gautier write-only
2009-10-30  0:39 ` Jeffrey R. Carter
2009-10-30  8:58   ` Gautier write-only
2009-10-30 19:12     ` Jeffrey R. Carter
2009-10-31 23:46       ` Gautier write-only
2009-11-01 21:38       ` Gautier write-only
2009-11-02 21:32       ` Randy Brukardt
2009-10-30  3:36 ` Georg Bauhaus
2009-10-30  9:13   ` Gautier write-only
2009-11-02 21:37     ` Randy Brukardt
2009-11-02 22:16       ` Gautier write-only
2009-10-30 13:40 ` Gautier write-only
2009-11-02 22:19   ` Gautier write-only
2009-11-17 12:57 ` Gautier write-only [this message]
2009-11-17 13:26   ` Ludovic Brenta
2009-11-17 20:19   ` Building GNAT on Windows (Was: Re: Performance of the Streams 'Read and 'Write) Tero Koskinen
2009-11-18 10:55     ` Gautier write-only
2009-11-26 13:23   ` Performance of the Streams 'Read and 'Write Gautier write-only
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox