comp.lang.ada
 help / color / mirror / Atom feed
From: anon@att.net
Subject: Re: GLIBC_2.14  memcpy
Date: Mon, 28 Apr 2014 12:23:53 +0000 (UTC)
Date: 2014-04-28T12:23:53+00:00	[thread overview]
Message-ID: <ljlh8n$psi$1@speranza.aioe.org> (raw)
In-Reply-To: 8d93b0b8-4cfb-43f9-b055-ad7ecf258020@googlegroups.com

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 <ian@vionia.com> 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

      reply	other threads:[~2014-04-28 12:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 13:28 GLIBC_2.14 memcpy Ian Douglas
2014-04-22 16:54 ` Tero Koskinen
2014-04-22 19:41   ` Ian Douglas
2014-04-22 21:58     ` Jeffrey Carter
2014-04-23  7:47 ` Stephen Leake
2014-04-23 11:11   ` G.B.
2014-04-23 18:30   ` Ian Douglas
2014-04-23  7:53 ` anon
2014-04-23 18:37   ` Ian Douglas
2014-04-24  9:56     ` anon
2014-04-26 20:10       ` Ian Douglas
2014-04-28 12:23         ` anon [this message]
replies disabled

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