From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d4226ffde2290b0c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k17g2000yqh.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Performance of the Streams 'Read and 'Write Date: Tue, 17 Nov 2009 04:57:26 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 206.122.158.4 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1258462646 4224 127.0.0.1 (17 Nov 2009 12:57:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 17 Nov 2009 12:57:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k17g2000yqh.googlegroups.com; posting-host=206.122.158.4; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8126 Date: 2009-11-17T04:57:26-08:00 List-Id: 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!