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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93123f6108f30530,start X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: Yet another efficiency question - To_Lower Date: 1997/07/02 Message-ID: <5pclke$203$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 254178159 Distribution: world X-XXMessage-ID: Organization: RMIT, Melbourne, Australia Newsgroups: comp.lang.ada Date: 1997-07-02T00:00:00+00:00 List-Id: 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