From: Gavin Kistner Date: 2006-09-14T23:22:23+09:00 Subject: Re: arbitrary indexes From: Jason Nordwick [mailto:jason@adapt.com] > Oh course. That's (now) blindingly obvious. I don't think there is much I > can do to prevent all the value_at calls. I can't really lay out my arrays > differently to get better continuity, and I seem to be using value_at > almost every line where there is a decent amount of computation. Overall, > arbitrary indexing seems far more useful than range based indexing using > the [start,len] notation. After all, there is already start../...stop > notation. Too bad I guess. It sounds to me like you're saying "Man, my program is slow because of all the #values_at method calls that I'm doing. I wish that I could use [1,3,5] to do what I want, because indexing like that would be faster." What you may not realize is that a[x] is itself a method call (the "[]" method) as is a[x] = 1 (the "[]=" method). So, there wouldn't be any inherent speed gain in changing arrays to do what you want them too. If you already realized this, sorry for the noise.