Re: Hm. ItemFactory vs. gtk2-perl 0.90 ? :)
- From: Ross McFarland <rwmcfa1 neces com>
- To: gtk-perl-list gnome org
- Subject: Re: Hm. ItemFactory vs. gtk2-perl 0.90 ? :)
- Date: 22 Jul 2003 17:28:54 -0400
On Tue, 2003-07-22 at 15:30, Chas Owens wrote:
I am just the sort of person who has to run a benchmark.
Rate brett joe ross
brett 21427/s -- -13% -41%
joe 24594/s 15% -- -32%
ross 36232/s 69% 47% --
Rate brett joe ross
brett 18325/s -- -3% -41%
joe 18976/s 4% -- -39%
ross 31211/s 70% 64% --
Rate brett joe ross
brett 26376/s -- -17% -52%
joe 31963/s 21% -- -42%
ross 55493/s 110% 74% --
Rate joe brett ross
joe 10175/s -- -18% -51%
brett 12375/s 22% -- -40%
ross 20613/s 103% 67% --
It looks like the simple if based switch cleans the other methods clocks. That
being said, Joe's makes it easy to add new keys and to alias keys (type and
item_type can both point to $item), but the keys for this function are already
written in stone (the Gtk API). I can't see a reason not to use the fastest
function in this case (since there will be little to no maintenance).
funny you should post this, muppet and myself were discussing this very
issue a few hours ago and had pretty much the same opinions. while the
cool perl magic is just that, cool and you get plenty of geek points,
fancy things normally are much slower than their straightforward counter
parts. that being said the easy addition of new keys (either of the
other two, although it's really trivial regardless) would be a benefit
in many situations, but not so much things one where things are pretty
static. for now what's there isn't broken, and as you said is the
fastest so it will probably stay.
people are more than welcome to scour the code and try to find places
where they can think of better methods of implementation, at the very
least your stuff will get considered.
-rm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]