go ahead... be a heretic | |
PerlMonks |
Re^2: Can I speed this up? (repetitively scanning ranges in a large array)by daverave (Scribe) |
on Nov 02, 2010 at 18:24 UTC ( [id://869065]=note: print w/replies, xml ) | Need Help?? |
That's a good idea that would surely help. However, I would have to check how much effect it will have. The example I gave is very small - less than 1000 ranges compared to the usual 25k. Also, I'm not sure if it represents the normal proportion of "contained" ranges (I would guess it's much lower than the 95% in this specific case). So, I will surely incorporate it and try it out, but I'm not confident it will have a great effect in the average case. UPDATEIt seems after in-lining the original object methods, filtering out a ranges takes about the same time as processing it (perhaps even longer). I therefore stopped using this for the meantime, although this seemed like a very nice idea. Perhaps there's a more efficient way of filtering the ranges?
In Section
Seekers of Perl Wisdom
|
|