diff options
author | Malfurious <m@lfurio.us> | 2024-02-20 12:44:35 -0500 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2025-01-02 02:50:40 -0500 |
commit | 778c0ca5c319a4dd2b34eae62062846e572a2411 (patch) | |
tree | 531bd880a24e877957ccd7027227ae9f3f9fb1a6 /sploit/rev/elf.py | |
parent | 70c7c16a157f0e2056d0b96b96f6e13c83841bc3 (diff) | |
download | nsploit-778c0ca5c319a4dd2b34eae62062846e572a2411.tar.gz nsploit-778c0ca5c319a4dd2b34eae62062846e572a2411.zip |
payload: Improve recursion performance
There is a small network of mutually-recursive helper functions which
produce the main outputs for Payload objects (the length, bytes, etc.).
The runtime performance of this code can suffer as a Payload grows to
contain more and more items.
These issues are heavily mitigated by implementing memoization within
one of these functions (which propagates the benefit to the rest of the
call tree). Memo dictionary is only used for a single operation
(lifetime) to avoid the possibility of bad cached results.
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'sploit/rev/elf.py')
0 files changed, 0 insertions, 0 deletions