[REBOL] Re: Algorithm challenge: compacting integers
From: SunandaDH::aol::com at: 21-Jan-2007 6:27
Thanks Anton,
(I'm partially responding to some comments on Altme/REBOL3 so those of us
reading only the mailing list may see some jumps in the conversation).
Your compact is still a little slower than Brian's, but way faster than mine.
The times I have are
Anton v2: 0:00:00.000020606
sunanda (live code): 0:00:00.000024493
Brian v1: 0:00:00.000016666
(The lower the number the better)
We only have two decompacts so far -- Anton's and mine. Anton's beats mine by
about 15%.
****
A couple of people have commented on the percentage a data set will compact.
One algorithm may be better on parse sets like:
[1 10 20 30 31 40 60 100 102]
While another is better on dense sets:
[1 2 3 4 5 6 7 10 20 21 22 23]
I've been using a test driver that generates variously sparse sets, and then
averages the results. I'll post it here soon so anyone else who wants a go
can try their code out first.
***
Thanks for the interest so far!!
More entries welcome!!
Sunanda