Perl-Sensitive Sunglasses | |
PerlMonks |
•Re: Data Structure needed for Event Queueby merlyn (Sage) |
on May 27, 2002 at 16:38 UTC ( [id://169615]=note: print w/replies, xml ) | Need Help?? |
You could always just shove it into a database with an index. {grin}
I'm not a CS expert, but I think a B-tree might be the right structure (see http://perl.plover.com/BTree/). Pure Perl B-Tree managers are available, such as Tree and Btrees. I think even a Berkeley DB can be stored "in core" with the BerkeleyDB module, and there's a B-Tree version of that. -- Randal L. Schwartz, Perl hacker update: yes, with DB_File, you can set up an in-memory DB (use undef for the filename), and with the right comparison callback, you get basic operations like
In Section
Seekers of Perl Wisdom
|
|