: > I have 2 hashes, %one and %two.
: >
: > the ($key, $value) of %one is a span of time.
: >
: > I need to compare this span of time over every $key of %two.
:
: ...
:
: Look at the replies given here earlier.
: I ran some benchmarks with while and grep, and your while loop didnt look
: less e
> I have 2 hashes, %one and %two.
>
> the ($key, $value) of %one is a span of time.
>
> I need to compare this span of time over every $key of %two.
>
> Here's what I have:
>
> while (($key1, $val1) = each (%one)) {
>
> while (($key2, $val2) = each (%two)) {
>
> if (($key2 >= $key1) && ($key2 <
: I have 2 hashes, %one and %two.
:
: the ($key, $value) of %one is a span of time.
:
: I need to compare this span of time over every $key of %two.
:
: Here's what I have:
:
: while (($key1, $val1) = each (%one)) {
:
: while (($key2, $val2) = each (%two)) {
:
: if (($ke
I have 2 hashes, %one and %two.
the ($key, $value) of %one is a span of time.
I need to compare this span of time over every $key of %two.
Here's what I have:
while (($key1, $val1) = each (%one)) {
while (($key2, $val2) = each (%two)) {
if (($key2 >= $key1) && ($key2
[given a set of ranges, find items that are in range.
one way is for each range, look at each item.
runtime is proportional to sizes: range set X item set
if this is too slow, what is a faster way?]
*Design notes*
If theory bores you, skip to *Implementation notes*.
1. Changing when you comp
On May 5, Jim Conte said:
>the ($key, $value) of %one is a span of time.
>
>I need to compare this span of time over every $key of %two.
>
>while (($key1, $val1) = each (%one)) {
>
> while (($key2, $val2) = each (%two)) {
>
> if (($key2 >= $key1) && ($key2 < $val1)) {
>
I have 2 hashes, %one and %two.
the ($key, $value) of %one is a span of time.
I need to compare this span of time over every $key of %two.
Here's what I have:
while (($key1, $val1) = each (%one)) {
while (($key2, $val2) = each (%two)) {
if (($key2 >= $key1) && ($key2