Re: Access times of an array
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Access times of an array

From: Gerald W. Lester <Gerald.Lester@cox.net>
Date: Mon Mar 13 2006 - 23:07:55 CET

randyjheeta@gmail.com wrote:
> My script is growing quite large, and I am considering grouping my
> global variables into an array, similar to:
>
> array set {
> Orange 1
> Apple 5
> Banana 6
> }
>
> instead of:
>
> global Orange
> global Apples
> global Banana
>
>
> Will I be at a serious speed disadvantage if I do this?

How many global variables are we talking about?

In general, the answer should be no.

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Received on Sun Apr 30 02:31:18 2006