For Programmers: Free Programming Magazines  


Home > Archive > Cobol > September 2007 > Re: COBOL "non-myth" confirmed - Index and subscripts (MF on Windows)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: COBOL "non-myth" confirmed - Index and subscripts (MF on Windows)
Richard

2007-09-15, 6:55 pm

On Sep 15, 6:50 pm, Robert <n...@e.mail> wrote:
> On Fri, 14 Sep 2007 22:51:45 -0700, Richard <rip...@Azonic.co.nz> wrote:
>
>
>
> There would probably be one multiply on the subscript because the optimizer would use that
> value on subsequent accesses. (I wrote that before reading your paragraph below sayig the
> same thing.)
>
>
> 1. Because a timing test showed indexes are slower.
> 2. Because multiplication is now as fast as loading an index.
>
>
> Subscript was faster in my test because the subscript was optimized but the index
> apparently was not. It appears the code was reloading the index on every iteration.
>
>
> Most people who use indexes believe it. Why else would they use indexes?


I don't believe that you have surveyed anything but a tiny sample of
coders so you have no idea, except for what, a few dozen, how many use
indexes, nor what they believe, nor why they use indexes.

I have actually done a test on Linux with Fujitsu 7. Within the
perform loop it does a couple of moves totaling 4 uses of subscript/
index:

subscript comp-5 9.58
index 9.52
subscript comp 13.35

Index _IS_ faster, at least on this system. Granted it is not much
faster when the MF extension of Comp-5 is used.

So there is no reason to stop using index at all. Your claims,
methodology and assertions are crap.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com