Skip to content

refactor(memory): memory usage improvements#2098

Merged
shamardy merged 4 commits intodevfrom
preallocated-fold
May 7, 2024
Merged

refactor(memory): memory usage improvements#2098
shamardy merged 4 commits intodevfrom
preallocated-fold

Conversation

@onur-ozkan
Copy link

self-explanatory

@onur-ozkan onur-ozkan changed the title refactor(memory): use preallocated String to improve memory usage in folding refactor(memory): prefer preallocated String Apr 23, 2024
@onur-ozkan onur-ozkan changed the title refactor(memory): prefer preallocated String refactor(memory): memory usage improvements Apr 23, 2024
@onur-ozkan onur-ozkan marked this pull request as draft April 23, 2024 05:55
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the preallocated-fold branch 6 times, most recently from ae75a3b to 7b041d6 Compare April 23, 2024 17:43
@onur-ozkan onur-ozkan marked this pull request as ready for review April 23, 2024 17:43
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@shamardy
Copy link
Collaborator

shamardy commented May 6, 2024

@onur-ozkan please fix conflicts in this PR so that I can approve it.

@onur-ozkan onur-ozkan force-pushed the preallocated-fold branch from 49d7d3c to a806b48 Compare May 7, 2024 05:15
@onur-ozkan
Copy link
Author

@onur-ozkan please fix conflicts in this PR so that I can approve it.

Done.

@shamardy shamardy merged commit cdf032b into dev May 7, 2024
@shamardy shamardy deleted the preallocated-fold branch May 7, 2024 11:26
@bsodmike
Copy link

bsodmike commented May 7, 2024

Hi @onur-ozkan curious to learn the advantage of calling vec![] rather than a follow up push, is this due to an extra memory allocation via the heap (in the case of std)?

I assume you're trying to avoid calling .push() on single element vectors?

@onur-ozkan
Copy link
Author

Hi @onur-ozkan curious to learn the advantage of calling vec![] rather than a follow up push, is this due to an extra memory allocation via the heap (in the case of std)?

I assume you're trying to avoid calling .push() on single element vectors?

Makes it easier for compiler to optimize (as it stays immutable explicitly) the memory usage.

dimxy pushed a commit to dimxy/komodo-defi-framework that referenced this pull request May 9, 2024
* dev:
  fix(eth): remove my_address from sign_and_send_transaction_with_keypair (GLEECBTC#2115)
  fix(utxo-swap): apply events occurred while taker down (GLEECBTC#2114)
  refactor(memory): memory usage improvements (GLEECBTC#2098)
dimxy pushed a commit to dimxy/komodo-defi-framework that referenced this pull request May 14, 2024
* dev:
  feat(tendermint): pubkey-only activation and unsigned tx (GLEECBTC#2088)
  fix(tests): set txfee for some tbtc tests (GLEECBTC#2116)
  fix(eth): remove my_address from sign_and_send_transaction_with_keypair (GLEECBTC#2115)
  fix(utxo-swap): apply events occurred while taker down (GLEECBTC#2114)
  refactor(memory): memory usage improvements (GLEECBTC#2098)
  feat(app-dir): implement root application dir `.kdf` (GLEECBTC#2102)
  fix tendermint fee calculation (GLEECBTC#2106)
  update dockerfile (GLEECBTC#2104)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants