comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <dale@goanna.cs.rmit.edu.au>
Subject: Yet another efficiency question - To_Lower
Date: 1997/07/02
Date: 1997-07-02T00:00:00+00:00	[thread overview]
Message-ID: <5pclke$203$1@goanna.cs.rmit.edu.au> (raw)


I was wondering if the a procedure

   procedure To_Lower (Item : in out String);

would be any more efficient for performing To_Lower operations
than the equivalent function in Ada.Characters.Handling, for when
a string is modified in place, i.e.

   Some_String : String (1..Size);
	
   Some_String := Ada.Characters.Handling.To_Lower (Some_String);

My simple view of the implementation of the function would be that it
allocates space (heap? secondary stack?), copies the values from 
Some_String to the temporary, modifies the value, and then copies it
back. (I'm always concerned when I think I see cases of copies being
made for no good reason).

C's to_lower, of course, just does an in place modification of the
'string'.


Dale




             reply	other threads:[~1997-07-02  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-02  0:00 Dale Stanbrough [this message]
1997-07-03  0:00 ` Yet another efficiency question - To_Lower Matthew Heaney
1997-07-04  0:00 ` Robert Dewar
1997-07-11  0:00 ` Dale Stanbrough
1997-07-11  0:00   ` Matthew Heaney
1997-07-15  0:00   ` Laurent Guerby
replies disabled

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