% tcl
tcl>for {set i 0} {$i < 10000} {incr i} {
=>set a($i) $i
=>}
tcl>time {expr $a(4000)} 4000
48 microseconds per iteration
tcl>time {rand 10000} 4000
2311 microseconds per iteration
tcl>time {expr $a([rand 10000])} 4000
2453 microseconds per iteration
tcl>
Rand is pretty slow, I'm surprised.
I think these times indicate it's doable with arrays. For random access to
the array you're looking at 140 microseconds per access, on a 230 MHz Alpha.
-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.