in reply to Re: Memory Optimization
in thread Memory Optimization

Speaking of memory optimizations, my %hash = my_build_hash_sub(); will toss around a list and eat memory for that. Returning a reference to a hash would in many cases be more efficient than returning a list of keys/values.

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Replies are listed 'Best First'.
Re: Re: Re: Memory Optimization
by jlongino (Parson) on Dec 30, 2001 at 06:11 UTC
    You're absolutely right. My concern when these snippets were written was not memory optimization so much as decreasing IO read/writes times.

    Thanks for the clarification. I'll look into rewriting the hash generation subs to use references.

    --Jim