[REBOL] Re: parse vs. load/markup (a bit long)
From: rotenca:telvia:it at: 24-Jan-2002 18:09
> if activity: select [...] first p [do activity]
> to eliminate the overhead of a mezzanine call and the needless
> (in this case) check for a /DEFAULT option.
An idea: if the select block is big, could be used an hash.
I've tested this idea with the big block svv/vid-styles, here the result on
one of the last field:
has: to-hash blk
== 88 ;not so big
to be sure:
>> equal? do select has 'TEXT-LIST do select blk 'TEXT-LIST
Now a loop of 100000 iteration:
>> timer2 [do select has 'TEXT-LIST] [do select blk 'TEXT-LIST] 100000
The time for block reduce to the start of block, so the average time should be
of 1.0 -1.10 against 0.5 - 0.55.
Because switch uses Select, we could use an hash also with switch.