in reply to indexing segments

There is some sample code you could reuse in DateTime::TimeZone (see the _spans_binary_search method)

The Set::Infinite module covers this problem, but it does not try to be "efficient".

Anyway, 100k is a lot of data, and you'd better not keep it in RAM. If you follow Abigail directions you'll find a lot of papers in google about how to do this using a database.

Replies are listed 'Best First'.
Re: Re: indexing segments
by glwtta (Hermit) on Oct 10, 2003 at 13:59 UTC
    Anyway, 100k is a lot of data, and you'd better not keep it in RAM.

    The bare minimum for these is an int for the id, and two ints for the coordinates. Of course with perl there's quite a bit of overhead, but it should still be manageable on 6 Gigs of RAM.