Skip to content

Conversation

@micheles
Copy link
Contributor

@micheles micheles commented Oct 4, 2023

Part of #9066. This is tripling the speed of an example calculation I have:

# before
| calc_15024, maxmem=5.5 GB  | time_sec | memory_mb | counts |
|----------------------------+----------+-----------+--------|
| total sample_ruptures      | 196.3    | 30.4      | 42     |
| EventBasedCalculator.run   | 368.8    | 603.4     | 1      |

# after
| calc_15023, maxmem=6.1 GB  | time_sec | memory_mb | counts |
|----------------------------+----------+-----------+--------|
| total sample_ruptures      | 198.1    | 6.00000   | 42     |
| EventBasedCalculator.run   | 137.1    | 603.2     | 1      |

Here is the speedup in .iter_ruptures being called 3x less times:

| ncalls    | cumtime | path                                          |
|-----------+---------+-----------------------------------------------|
| 2752431   | 521.475 | kite_fault.py:125(iter_ruptures)              |
| 917477    | 176.358 | kite_fault.py:163(iter_ruptures)              |

In @CatalinaYepes calculation for Domenican Republic (#54890) the speedup in counting the ruptures is 4x,
from 119m to 29.5m.

@micheles micheles added this to the Engine 3.18.0 milestone Oct 4, 2023
@micheles micheles requested a review from mmpagani October 4, 2023 07:27
@micheles micheles merged commit e7280d5 into master Oct 4, 2023
@micheles micheles deleted the cache_count_ruptures branch October 4, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants