![]() The debate about when to use data references, when to use field-symbols, and when to use a variable/structure - which Mike Pokraka (and in Mike we trust) says can be even faster than field-symbols in specific cases - is a debate that applies when optimizing performance. The speed is in most situations not relevant for the loop iteration. I think that quote sums up nicely the arguments for the recommendation to use data references. Yet we should not pass up our opportunities in that critical 3%. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. ![]() Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. In reality it's more likely to have * all over the place, and I prefer to use field symbols in those cases.Ĭan a quote from Donald Knuth help close this issue? But even in this case, reducing this 1% by 13% means shaving 0.13% off the overall runtime. just the LOOP-ing, not the stuff inside the loop). ![]() I think it would be an extreme case if even 1% of an average application's runtime is taken up by loop iteration (i.e. Regarding impact: As described in the performance section, the vast majority of the performance will be taken up by DB activity and various other things. From memory the threshold was for rows between 100-200 chars in length, it may even be in the ABAP Docu somewhere. But for narrow tables it is even faster to use a simple DATA field instead of a FS or ref. I looked into this some time ago and also found the same.
0 Comments
Leave a Reply. |