Menu

#218 Improve cache access for runtime

v1.1.x
closed
None
v1.1.0
Change Request
2017-08-20
2017-07-11
Erik Hänel
No

If one accesses many different caches or many different regions of one cache in equations inside a loop, the runtime is overproportional increasing compared to the same operations done only with scalar values. Find a solution for caching the relevant parsing steps instead of re-calculating them every time.

Analysis:
This can only be done with multiple changes:

  • The current way of accessing data objects has to be changed so that the index evaluation is centralized in parser_getIndices(). This way, all optimizations of the index evaluation are distributed to all relevant locations.
  • Furthermore the bytecode caching in loops has to be adapted so that the index evaluations are stored as well. It's possible that this change will require also a change in how the bytecode is cached in principle, e.g. changing the cache from a 1D cache array to a 2D one.

Implementation:
Change was implemented as proposed by the analysis. In addition, multiple changes were done in Loop::calc() so that the function after the first iteration knows, which of its parts is necessary for the current equation. A runtime improvement up to a factor 4 was achieved. Implementation test were passed successfully.

Documentation:
Not needed. Internal change without a change in functionality.

Tests:
Durability tests returned no deviations. Change implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2017-07-11
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2017-07-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     If one accesses many different caches or many different regions of one cache in equations inside a loop, the runtime is overproportional increasing compared to the same operations done only with scalar values. Find a solution for caching the relevant parsing steps instead of re-calculating them every time.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2017-07-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,10 @@
     If one accesses many different caches or many different regions of one cache in equations inside a loop, the runtime is overproportional increasing compared to the same operations done only with scalar values. Find a solution for caching the relevant parsing steps instead of re-calculating them every time.
    
     **Analysis:**
    +This can only be done with multiple changes:
    +
    +- The current way of accessing data objects has to be changed so that the index evaluation is centralized in `parser_getIndices()`. This way, all optimizations of the index evaluation are distributed to all relevant locations.
    +- Furthermore the bytecode caching in loops has to be adapted so that the index evaluations are stored as well. It's possible that this change will require also a change in how the bytecode is cached in principle, e.g. changing the cache from a 1D cache array to a 2D one.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2017-07-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,7 +7,9 @@
    
     - Furthermore the bytecode caching in loops has to be adapted so that the index evaluations are stored as well. It's possible that this change will require also a change in how the bytecode is cached in principle, e.g. changing the cache from a 1D cache array to a 2D one.
    
     **Implementation:**
    +Change was implemented as proposed by the analysis. In addition, multiple changes were done in `Loop::calc()` so that the function after the first iteration knows, which of its parts is necessary for the current equation. A runtime improvement up to a factor 4 was achieved. Implementation test were passed successfully.
    
     **Documentation:**
    +Not needed. Internal change without a change in functionality.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2017-08-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -13,3 +13,4 @@
     Not needed. Internal change without a change in functionality.
    
     **Tests:**
    +Durability tests returned no deviations. Change implemented successfully.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB