You still need to malloc() your memory; however I realize that the
allocator can be *really* fast here. But still, you give a lot of the
gain back during the mark-and-sweep phase, especially if you also
move/compact the memory.
As you said, the allocator can be really fast. Most advanced gc
Brent Dax wrote:
On the other hand, it could stop some of the really stupid uses for
inheritance I've seen. The dumbest one was in high school Advanced
Placement's C++ classes--the queue and stack classes inherited from the
array class!
Oh? How could final classes prevent such a travesty?
On Tue, 28 Aug 2001, Sam Tregar wrote:
Well, there's the Perl 5 reference counting solution. In normal cases
DESTROY is called as soon as it can be. Of course we're all anxious to
get into the leaky GC boat with Java and C# because we've heard it's
faster. I wonder how fast it is when
This arrived as part of a mailing list that I suppose I opted into
at some point:
==
More ++, Less C
Standard template libraries, abstract classes and multiparadigm programming
are keys to
high-performance
==
Too much C++ code is just C.
Michael G Schwern wrote:
If you *really* wanted to write an optimized redirector, you'd
have the redirector eliminate itself.
sub foo {
my $method = $_[0]-{_foo} || $_[0]-can(_foo);
{
no warnings 'redefine';
*foo = $method;
}
goto $method;
}
:)
Michael G Schwern wrote:
The idea that a class is either 'perfect' or 'complete' has to be the
silliest, most arrogant thing I've ever heard!
So, subsequent refinements have to use a has-a
instead of an is-a relation in re: objects of the final class.
Maybe the inclusion of this feature
I sure miss multi-dispatch.
http://dev.perl.org/rfc/256.html
Damian
Schwern explained:
# Following RFC 256
sub name (Foo $self) : multi {
return $self-{name};
}
sub name (Foo $self, STRING $name) : multi {
$self-{name} = $name;
return $self-{name};
}
which is quite a bit