Re: How to improve speed of returning value from calling method on an array of objects?

2006-01-06 Thread Tom Phoenix
On 1/6/06, Sai Tong <[EMAIL PROTECTED]> wrote: > The problem is this code runs too slowly for a large array of objects. > Its seems that it might be a little too slow to "push" each > returned value into @return_values . Can anyone suggest the best way to > improve the speed of putting the returne

Re: How to improve speed of returning value from calling method on an array of objects?

2006-01-06 Thread Adriano Ferreira
On 1/6/06, Sai Tong <[EMAIL PROTECTED]> wrote: > I have an array of many objects and I want to call a method on > each of these objects and the save the returned values into an array: > my @return_values; > foreach my $retrievedObject (@array_of_objects) { > push (@return_values , $retrievedObject

How to improve speed of returning value from calling method on an array of objects?

2006-01-06 Thread Sai Tong
Hi, I have an array of many objects and I want to call a method on each of these objects and the save the returned values into an array: my @return_values; foreach my $retrievedObject (@array_of_objects) { push (@return_values , $retrievedObject->method ); } The problem is this code runs too sl