comp.lang.ada
 help / color / mirror / Atom feed
* Yet another efficiency question - To_Lower
@ 1997-07-02  0:00 Dale Stanbrough
  1997-07-03  0:00 ` Matthew Heaney
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dale Stanbrough @ 1997-07-02  0:00 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-07-15  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-02  0:00 Yet another efficiency question - To_Lower Dale Stanbrough
1997-07-03  0:00 ` 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

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