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



Howard Brazee wrote:
On Wed, 19 Sep 2007 10:59:14 -0400, donald tees
<donaldtees@xxxxxxxxxxxxx> wrote:

I've always believed that 99% of efficiency is in the algorithmic design. Once you've decided on the data structure, and the general approach to the problem, tiny code level decisions are not going to affect the speed much. They will have an effect, sure, but they won't fix an inefficient methodology, nor will they completely screw up an efficient approach.

I'm not sure what this means. Does it include moving stuff outside
of a loop that don't need to be in the loop? Does it include
understanding the database processes and structure? Does it include
understanding how to optimize swap space in the OS? Does it measure
the costs and benefits of a CoBOL sort vs. an external sort?


No, the exact opposite. I am saying that by the time you decide what the main loop is, you are probably far enough into it that the major efficiencies are relatively fixed. Maybe by the time you break it down into program modules that is true.

Decisions like comparing various sorts are not as important as decisions like "do I sort it, or do I keep it in an ordered data base from the start and do lookups?"

I have a program that looks to see what campus is running that
program. If it is one of the big campuses, it does an area sweep, if
it's one of the small campuses, it walks the set. This was
determined by testing the speeds of the two choices.

Closer to what I mean. Two completely different methodologies, depending on requirements. I do not think that something like testing indexing vs subscripting is going to make nearly as big a difference, and is usually a moot point. There are exceptions to every rule, of course, and such a tiny issue may turn out to be important in some very specialized instance, but in the normal turn of things, micro-level coding is a waste of effort.

Donald
.



Relevant Pages

  • Re: Performance Improvement of complex data structure (hash of hashes of hashes)
    ... Anno Siegel wrote: ... >> Here is the code that I'm using to build up this data structure. ... loop through and increment the ... I know that memory allocation in C is expensive, ...
    (comp.lang.perl.misc)
  • Re: help with VBA
    ... Within your loop you determine that you're at ... and know that you need to sort everything on all of the rows from 4 to this ... "indraneel" wrote: ... The first thing to do is to name the ranges you want sorted, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: conciseness is power
    ... (maphash (lambda (normal words) ... (push words anagrams))) ... (loop for word = (read-line s nil) ... (loop for group in anagrams do (setf group (sort group #'string-lessp))) ...
    (comp.lang.lisp)
  • Very odd Sort problem when modifying DGV bound data
    ... I have a DGV that is bound to a DataTable that is loaded during application ... I can sort with all the columns and everything works fine. ... a method that can be invoked from a context menu that will loop through the ... Try and sort the ProductID column. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: fastest way to sort 2-D variant arrays?
    ... and then change the FSO loop section to loop through the ... array, and add the elements to the recordset using the AddNew statement. ... How would I write my variant array to the recordset? ... Here is something that I use on an ASP page to sort files by date there ...
    (microsoft.public.vb.general.discussion)