Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Object-Oriented programming without classes!

by bikeNomad (Priest)
on Jul 05, 2001 at 03:09 UTC ( [id://93975]=note: print w/replies, xml ) Need Help??


in reply to Re: Object-Oriented programming without classes!
in thread Object-Oriented programming without classes!

It looks like mine is more complete, with data inheritance, inclusion of external files (which allows explicit loading of functionality into selected objects), and the ability to delete fields or methods.

At least from the README; I haven't been able to get a copy of it from CPAN yet.

update: I finally found a copy; it's efficient but doesn't provide for inheritance or data fields; mine is much more complete. And just as fast, as far as I can tell. I also benchmarked against Class::Classless; my code is quite a bit faster (168x as fast for inherited subroutine calls, 20+ times as fast for field access!):

empty subroutine calls Rate Classless SelfMethods Prototyped Object Pl +ainOleData Classless 4225/s -- -95% -99% -99% + -99% SelfMethods 90540/s 2043% -- -84% -84% + -85% Prototyped 577873/s 13578% 538% -- -1% + -2% Object 582772/s 13694% 544% 1% -- + -1% PlainOleData 587346/s 13802% 549% 2% 1% + -- empty inherited subroutine calls Rate Classless Prototyped Object Classless 3370/s -- -99% -99% Prototyped 568592/s 16772% -- -1% Object 572334/s 16883% 1% -- field reading Rate Classless SelfMethods Prototyped PlainOleD +ata Classless 3969/s -- -88% -95% - +98% SelfMethods 34115/s 760% -- -54% - +84% Prototyped 74488/s 1777% 118% -- - +64% PlainOleData 209199/s 5171% 513% 181% + -- field writing Rate Classless SelfMethods Prototyped PlainOleD +ata Classless 3760/s -- -92% -96% - +98% SelfMethods 47737/s 1170% -- -44% - +74% Prototyped 85151/s 2165% 78% -- - +54% PlainOleData 184470/s 4806% 286% 117% + -- inherited field reading Rate Classless Prototyped Classless 3268/s -- -96% Prototyped 73604/s 2152% -- inherited field writing Rate Classless Prototyped Classless 3231/s -- -96% Prototyped 85301/s 2540% --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://93975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found