From: Diego Olivier Fernandez Pons <Diego-Olivier.FERNANDEZ-PONS@cicrp.jussieu.fr>
To: Tibor Simko <tibor.simko@cern.ch>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] intersecting huge integer sets
Date: Thu, 29 Aug 2002 12:13:18 +0200 (DST) [thread overview]
Message-ID: <Pine.A32.3.95.1020829115418.108094B-101000@ibm1.cicrp.jussieu.fr> (raw)
In-Reply-To: <87n0r835w9.fsf@pcdh91.cern.ch>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1098 bytes --]
Bonjour,
I made a small module with tries in base n where n is inferior to the
native integer size. I supports big-endian tries and little-endian
tries (in fact, user defined decomposition)
avaible functions :
- insert (log n)
- delete (log n)
- from_list (n log n)
- to_list (unknown)
- union (shoud be n)
- intersection (should be n)
I do not know if they are faster or not than bit-vectors or patricia
trees, but they save a lot of space
A set of integers from 0 to 9999 (I tried with 1 000 000 items as you
suggested but my function never ended. I remember a computation by
Xavier Leroy showing that a counter could hardly overflow)
(results given by JC Fillâtre's module Size)
avl set : 200 000 bytes
red-black set : 160 012 bytes
30 bit trie big-endian : 5 524 bytes
31 bit trie big-endian : 5 312 bytes
30 bit trie little-endian : 15 020 bytes
31 bit trie little-endian : 16 016 bytes
The implementation is not speed optimized. In fact one could also save
some more space compacting bits for bases inferior to int_size / 2
Diego Olivier
[-- Attachment #2: bitSet --]
[-- Type: APPLICATION/octet-stream, Size: 1178 bytes --]
next prev parent reply other threads:[~2002-08-29 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-27 11:20 Tibor Simko
2002-08-27 11:52 ` Markus Mottl
2002-08-27 12:09 ` Diego Olivier Fernandez Pons
2002-08-27 12:06 ` Yaron M. Minsky
2002-08-27 12:12 ` Markus Mottl
2002-08-28 12:29 ` Tibor Simko
2002-08-29 10:13 ` Diego Olivier Fernandez Pons [this message]
2002-08-29 11:33 ` [Caml-list] barre dans le filtrage de motifs Diego Olivier Fernandez Pons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.A32.3.95.1020829115418.108094B-101000@ibm1.cicrp.jussieu.fr \
--to=diego-olivier.fernandez-pons@cicrp.jussieu.fr \
--cc=caml-list@inria.fr \
--cc=tibor.simko@cern.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).