in reply to Re: Object-Oriented programming without classes!
in thread Object-Oriented programming without classes!
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% --
|
---|