Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
As the old joke goes: if I were setting out to get there, I wouldn't be starting from here! Presumably you do not magically start out with these thousands of Set::IntSpan objects. You must be building them up from the log file(s)? If so, it would be far more efficient to build up your required final representation, at the same time, (or in place of), as you are iterating the log and generating those objects. The logic is far simpler and falls out naturally from the ordered nature of the log:
By the time you've iterated the logs and generated the IntSpan objects, you already have your array of concurrency counts per timeslot for free. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re: Efficient algorithm needed to split Set::IntSpan objects
by BrowserUk
|
|