in reply to Re: Re: Re: Re: Memory Use/Garbage Collection: Java vs Perl
in thread Memory Use/Garbage Collection: Java vs Perl
That's interesting, thanks. Am I correct in my (I'm not sure if it's a memory of something I read somewhere, or an assumption I have formed) that Perl will fold string constants?
From my (brief and un-expert) look at the byte code produced by javac, it seems to be pushing a new copy of the two constants onto the stack (they could be pointers to a single copy, I can't make up my mind) prior to the call to StringBuffer, at each invokation?
Whereas I assume that Perl would push a reference to a single copy of each.
Thinking about that, javac is probably pushing a pointer too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re6: Memory Use/Garbage Collection: Java vs Perl
by John M. Dlugosz (Monsignor) on Sep 03, 2002 at 15:25 UTC | |
by jsprat (Curate) on Sep 03, 2002 at 20:55 UTC | |
by John M. Dlugosz (Monsignor) on Sep 03, 2002 at 21:34 UTC |