Thursday, November 3, 2022

Looping & Performance in ABAP - Work Area, Field Symbol or Data Reference

Let's consider following test scenarios:


1. Changing the number of rows and looping over an internal table of type BSEG​

The graph represents the avarage performance of 1000 runs​


2. Changing the number of fields in an internal table of 1000 rows​

The graph represents the avarage performance of 1000 runs​




Conclusions:

  • Field-symbols are slightly faster than reference variables​
  • The larger the internal table, the more it matters  how you loop​
  • In smaller internal tables you can use reference into, in order to achieve more object-oriented-like code​
  • The winner in terms of performance - field symbols




No comments:

Post a Comment