for ultimate speed, you might want to do this instead:

table: make hash! [
>     3 ["Tim" "Peterson" 2]
>     1 ["John" "Smith"   3 ]
>     2 ["Jeff" "Brown"   1 ]
> ]



select  table  1

== ["John" "Smith" 3]


but its a question of tradeoffs, RAM speed, and how large/flexible your
dataset and algorythms are ...  I guess the best thing is to try different
approaches and see what is best for you...

sometimes, just converting a table into another is a bigger hit in itself.

-MAx


On 9/4/07, Maxim Olivier-Adlhoch <[EMAIL PROTECTED]> wrote:
>
> examble using new nice data  :-)
>
> >
> > table: [
> >     3 "Tim" "Peterson" 2
> >     1 "John" "Smith"   3
> >     2 "Jeff" "Brown"   1
> > ]
>
>
>
> select/skip  table  1 4
>
> == ["John" "Smith" 3]
>
> this also has the advantage of being very fast and saves a lot of ram.
> and on big apps/data set this is an exponential save, as you are freeing the
> GC of a lot of ram juggling, for those unneeded blocks.
>
> -MAx
>
>


-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to