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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: GLIBC_2.14 memcpy Date: Mon, 28 Apr 2014 12:23:53 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <8d93b0b8-4cfb-43f9-b055-ad7ecf258020@googlegroups.com> Reply-To: anon@att.net NNTP-Posting-Host: apwfbiQXUBMDAGpeHxfRUg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: news.eternal-september.org comp.lang.ada:19613 Date: 2014-04-28T12:23:53+00:00 List-Id: Your Welcome! The reduction in "file size" due to the fact that the linker is only adding the new "memcpy" function instead of adding the complete GLIBC library. Now, "GNAT Ada" uses only a small number of routines that are contained in the GLIBC library so it is easier to rewrite the routines when they are needed instead of trying to use the complete standard library. Pro: 1. Smaller footprint, reduction of dead code. 2. Easy to compile for either 32 or 64 bit mode. 3. Easy to compile for different operating environments. Con: Code may not be at maximum optimization unless code is written using "System.Machine_Code". Note: For a smaller footprint, and a faster code you could rewrite the function "Memcpy" using System.Machine_Code package. The footprint for the machine code is round 16 instructions while the Ada optimization code version is around 21 instructions. So, unless the increase in speed is paramount or memory is limited the use of machine code may not be worth the additional work. In <8d93b0b8-4cfb-43f9-b055-ad7ecf258020@googlegroups.com>, Ian Douglas writes: >On Thursday, 24 April 2014 11:56:15 UTC+2, an...@att.net wrote: >> A simple System.Memory_Copy package > >Thanks, have followed your code and confirm that it works both=A0 >locally and on the server. > >The other thing is that the filesize dropped from 547654 to 343340=A0 >which is better but still much more than I would like :-) > >I did try using GNAT.IO first instead of ADA IO but that didn't work=A0 >either. > >Thanks again :) > >cheers, Ian