I tested the performance of array-based Object::InsideOut objects on several platforms, and was impressed with the results: I got anywhere from 20% (Solaris) to 40% (ActivePerl) performance improvement for basic fetch and store operations over blessed-hash objects!
I hope this may prove to be sufficient incentive for some of my fellow monks to give Object::InsideOut a try. This lastest version is available on CPAN. Enjoy.
Update:
In addition to speed improvements, using arrays consumes less memory because Perl doesn't have to store hash keys for the object field data.
The programming effort for using hash-based inside-out objects and array-based inside-out objects is the same: You just use '@' instead of '%' when declaring your object data fields.
Update 2:
I just uploaded v1.01.00 which adds support for object serialization.
See New Module Announcement: Object::InsideOut for more discussion on Object::InsideOut.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Array-based Inside-out Objects with Object::InsideOut
by ghenry (Vicar) on Nov 14, 2005 at 23:14 UTC | |
Re: Array-based Inside-out Objects with Object::InsideOut
by rvosa (Curate) on Nov 18, 2005 at 00:41 UTC | |
by jdhedden (Deacon) on Nov 18, 2005 at 01:00 UTC | |
by rvosa (Curate) on Feb 21, 2006 at 00:38 UTC | |
by jdhedden (Deacon) on Feb 21, 2006 at 18:30 UTC | |
by rvosa (Curate) on Feb 21, 2006 at 20:32 UTC | |
|